Repository navigation
Closed
Labels
bugSomething isn't working
Description
Describe the bug
When a GIN index is added to the properties of a vertex, MATCH queries with a constraint on an integer property return 0 results.
How are you accessing AGE (Command line, driver, etc.)?
- psql
What data setup do we need to do?
SELECT * FROM cypher('cypher_index', $$CREATE (p:Person {id: 1, name: 'John'}) return p$$) as (p agtype);
CREATE INDEX props on cypher_index."Person" USING GIN (properties);
SET enable_seqscan=false;What is the necessary configuration info needed?
- /
What is the command that caused the error?
SELECT * FROM cypher('cypher_index', $$MATCH (p:Person {id: 1}) return p$$) as (p agtype);
p
---
(0 rows)Expected behavior
One row should be returned
Environment (please complete the following information):
- Version: d5cd568
Additional context
This bug is a minimal reproduction of the issue described in #45 (comment)
The same query wih a constraint on a string property gives correct results:
SELECT * FROM cypher('cypher_index', $$MATCH (p:Person {name: 'John'}) return p$$) as (p agtype);
p
---------------------------------------------------------------------------------------------
{"id": 844424930131969, "label": "Person", "properties": {"id": 1, "name": "John"}}::vertex
(1 row)
Explain for the integer property constraint:
SELECT * FROM cypher('cypher_index', $$EXPLAIN MATCH (p:Person {id: 1}) return p$$) as (p agtype);
QUERY PLAN
-------------------------------------------------------------------------------
Bitmap Heap Scan on "Person" p (cost=12.00..16.02 rows=1 width=32)
Recheck Cond: (properties @> agtype_build_map('id'::text, '1'::agtype))
-> Bitmap Index Scan on props (cost=0.00..12.00 rows=1 width=0)
Index Cond: (properties @> agtype_build_map('id'::text, '1'::agtype))
(4 rows)
Explain for the string property constraint:
SELECT * FROM cypher('cypher_index', $$EXPLAIN MATCH (p:Person {name: 'John'}) return p$$) as (p agtype);
QUERY PLAN
--------------------------------------------------------------------------------------
Bitmap Heap Scan on "Person" p (cost=12.00..16.02 rows=1 width=32)
Recheck Cond: (properties @> agtype_build_map('name'::text, '"John"'::agtype))
-> Bitmap Index Scan on props (cost=0.00..12.00 rows=1 width=0)
Index Cond: (properties @> agtype_build_map('name'::text, '"John"'::agtype))
(4 rows)
Metadata
Metadata
Assignees
Labels
bugSomething isn't working
Type
Projects
- StatusShow more project fieldsNo status
Activity
pdpotter commentedon Aug 10, 2022
This issue has been fixed in 392a937.