MuhammadTahaNaveed commented on issue #2322:
URL: https://github.com/apache/age/issues/2322#issuecomment-3798618129
@ZhengZhanFei I was able to reproduce the issue on AGE `1.6.0` but not on
the current `master` branch. See the following:
```
issue_2322=# CREATE EXTENSION IF NOT EXISTS age;
CREATE EXTENSION
issue_2322=# SET search_path = ag_catalog, "$user", PUBLIC;
SET
issue_2322=# SELECT create_graph('agload_test_graph');
NOTICE: graph "agload_test_graph" has been created
create_graph
--------------
(1 row)
issue_2322=# SELECT create_vlabel('agload_test_graph', 'Country');
NOTICE: VLabel "Country" has been created
create_vlabel
---------------
(1 row)
issue_2322=# CREATE INDEX ON agload_test_graph."Country" USING GIN
(properties);
CREATE INDEX
issue_2322=# SELECT load_labels_from_file('agload_test_graph', 'Country',
'age_load/data/countries.csv', true);
load_labels_from_file
-----------------------
(1 row)
issue_2322=# EXPLAIN select * from cypher('agload_test_graph', $$MATCH
(n:Country {tld: ".ax"}) return n$$) as (a agtype);
QUERY PLAN
------------------------------------------------------------
Seq Scan on "Country" n (cost=0.00..3.67 rows=1 width=32)
Filter: (properties @> '{"tld": ".ax"}'::agtype)
(2 rows)
issue_2322=# select * from cypher('agload_test_graph', $$MATCH (n:Country
{tld: ".ax"}) return n$$) as (a agtype);
a
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------
{"id": 844424930131970, "label": "Country", "properties": {"id": "2",
"tld": ".ax", "iso2": "AX", "iso3": "ALA", "name": "Aland Islands", "emoji":
"🇦🇽", "__id__": 2, "emojiU": "U+1F1E6 U+1F
1FD", "native": "Ã…land", "region": "Europe", "capital": "Mariehamn",
"currency": "EUR", "latitude": "60.116667", "longitude": "19.9", "subregion":
"Northern Europe", "phone_code": "+358-18",
"numeric_code": "248", "currency_symbol": "€"}}::vertex
(1 row)
issue_2322=# set enable_seqscan = off;
SET
issue_2322=# EXPLAIN select * from cypher('agload_test_graph', $$MATCH
(n:Country {tld: ".ax"}) return n$$) as (a agtype);
QUERY PLAN
----------------------------------------------------------------------------------------
Bitmap Heap Scan on "Country" n (cost=12.99..17.01 rows=1 width=32)
Recheck Cond: (properties @> '{"tld": ".ax"}'::agtype)
-> Bitmap Index Scan on "Country_properties_idx" (cost=0.00..12.99
rows=1 width=0)
Index Cond: (properties @> '{"tld": ".ax"}'::agtype)
(4 rows)
issue_2322=# select * from cypher('agload_test_graph', $$MATCH (n:Country
{tld: ".ax"}) return n$$) as (a agtype);
a
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------
{"id": 844424930131970, "label": "Country", "properties": {"id": "2",
"tld": ".ax", "iso2": "AX", "iso3": "ALA", "name": "Aland Islands", "emoji":
"🇦🇽", "__id__": 2, "emojiU": "U+1F1E6 U+1F
1FD", "native": "Ã…land", "region": "Europe", "capital": "Mariehamn",
"currency": "EUR", "latitude": "60.116667", "longitude": "19.9", "subregion":
"Northern Europe", "phone_code": "+358-18",
"numeric_code": "248", "currency_symbol": "€"}}::vertex
(1 row)
```
AGE `1.7.0` for PG17 will have a fix for this issue and will be out soon,
the release cycle has already started. For now, you can use `REINDEX INDEX
graph.label_name` after the load command to rebuild the outdated index and the
query should work fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]