Skip to content

Commit

Permalink
fix: Columns not visible when using a VLE. (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
emotionbug committed Feb 27, 2023
1 parent f0ea4e1 commit 29a7756
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
38 changes: 37 additions & 1 deletion src/test/regress/expected/cypher_dml2.out
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,46 @@ EXPLAIN VERBOSE MATCH p=(a)-[]-(a) RETURN *;
(20 rows)

-- #609, column does not exists
EXPLAIN MATCH (a),(a)-[*1..1]->(b) RETURN count(a);
QUERY PLAN
-------------------------------------------------------------------------------------
Aggregate (cost=101.16..101.17 rows=1 width=32)
-> Hash Join (cost=37.00..98.16 rows=1200 width=46)
Hash Cond: ("<0000000017>"."end" = b.id)
-> Nested Loop (cost=0.00..58.00 rows=1200 width=54)
-> Seq Scan on ag_vertex a (cost=0.00..22.00 rows=1200 width=46)
-> Subquery Scan on "<0000000017>" (cost=0.00..0.02 rows=1 width=8)
-> Graph VLE [1..1] (cost=0.00..0.01 rows=1 width=0)
-> Result (cost=0.00..0.01 rows=1 width=48)
-> Hash (cost=22.00..22.00 rows=1200 width=8)
-> Seq Scan on ag_vertex b (cost=0.00..22.00 rows=1200 width=8)
(10 rows)

MATCH (a),(a)-[*1..1]->(b) RETURN count(a);
count
-------
3
1
(1 row)

EXPLAIN MATCH (a)-[*1..1]->(b) RETURN count(a);
QUERY PLAN
-------------------------------------------------------------------------------------
Aggregate (cost=101.16..101.17 rows=1 width=32)
-> Hash Join (cost=37.00..98.16 rows=1200 width=46)
Hash Cond: ("<0000000019>"."end" = b.id)
-> Nested Loop (cost=0.00..58.00 rows=1200 width=54)
-> Seq Scan on ag_vertex a (cost=0.00..22.00 rows=1200 width=46)
-> Subquery Scan on "<0000000019>" (cost=0.00..0.02 rows=1 width=8)
-> Graph VLE [1..1] (cost=0.00..0.01 rows=1 width=0)
-> Result (cost=0.00..0.01 rows=1 width=48)
-> Hash (cost=22.00..22.00 rows=1200 width=8)
-> Seq Scan on ag_vertex b (cost=0.00..22.00 rows=1200 width=8)
(10 rows)

MATCH (a)-[*1..1]->(b) RETURN count(a);
count
-------
1
(1 row)

DROP GRAPH cypher_dml2 CASCADE;
Expand Down
3 changes: 3 additions & 0 deletions src/test/regress/sql/cypher_dml2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ EXPLAIN VERBOSE MATCH (a)-[]-(a) RETURN *;
EXPLAIN VERBOSE MATCH p=(a)-[]-(a) RETURN *;

-- #609, column does not exists
EXPLAIN MATCH (a),(a)-[*1..1]->(b) RETURN count(a);
MATCH (a),(a)-[*1..1]->(b) RETURN count(a);
EXPLAIN MATCH (a)-[*1..1]->(b) RETURN count(a);
MATCH (a)-[*1..1]->(b) RETURN count(a);

DROP GRAPH cypher_dml2 CASCADE;

0 comments on commit 29a7756

Please sign in to comment.