age icon indicating copy to clipboard operation
age copied to clipboard

Server crashes when using exists(path) with explicit lenght paths

Open FrancescoSillani opened this issue 1 year ago • 8 comments

Describe the bug When using the exists(path) function in a WHERE clause, specifying path length (see example command, slightly adapded from your documentation), the extension crashes and the query does not complete

How are you accessing AGE (Command line, driver, etc.)? This can be reproduced using PGAdmin

What is the command that caused the error?

LOAD 'age';
SET search_path TO ag_catalog;

SELECT * FROM ag_catalog.create_graph('crash_graph');

SELECT * FROM cypher('crash_graph', $$  CREATE (:term {value: 'node_1' }) $$) as (n agtype);
SELECT * FROM cypher('crash_graph', $$  CREATE (:term {value: 'node_2' }) $$) as (n agtype);

SELECT * 
FROM cypher('crash_graph', $$
    MATCH (a:term), (b:term)
    WHERE a.value = 'node_1' AND b.value = 'node_2'
    CREATE (a)-[e:RELATION]->(b)
    RETURN e
$$) as (e agtype);

SELECT * FROM ag_catalog.cypher('crash_graph', $$
     MATCH (n)
     WHERE exists((n)-[:RELATION*1]-())
     RETURN n.value
$$) as (full_name agtype);

Expected behavior The query completes producing results according to specified where clause

Environment (please complete the following information):

  • Version: 1.5.0

Additional context I developed a thesauri using Apache AGE. The project was built using version 1.0.0 of apache AGE (the image available since a few months ago, using postgres 11). I'm now evaluating the effort on porting the project on latest apache age version. So far i tested these docker images, both with the same issue: apache/age apache/age:release_PG15_1.5.0

old (and obsolete i'm afraid) version worked as expected

FrancescoSillani avatar Jun 12 '24 13:06 FrancescoSillani

@FrancescoSillani I'll take a look.

jrgemignani avatar Jun 17 '24 21:06 jrgemignani

Thx a lot

FrancescoSillani avatar Jun 18 '24 10:06 FrancescoSillani

@FrancescoSillani PR #1924 fixes this issue. It is currently in review.

jrgemignani avatar Jun 19 '24 00:06 jrgemignani

Great! how it will be eventually relased?

FrancescoSillani avatar Jun 19 '24 07:06 FrancescoSillani

All of the branches have been updated. You can always pull down the latest branch :) I'm not sure when the next releases will be, though.

jrgemignani avatar Jun 20 '24 23:06 jrgemignani

Currently I'm using AGE via docker images, and that would force me to wait for a new release. BTW, I can evaluate the effort of building/installing the extension explicitly.

Anyway, thx a lot again for the support!

FrancescoSillani avatar Jun 21 '24 09:06 FrancescoSillani

@FrancescoSillani You can use the dev_snapshot_ docker images to test, if you like. However, they aren't official releases and are not supported. But, they are the latest docker images for the branches.

jrgemignani avatar Jun 21 '24 19:06 jrgemignani

This issue is stale because it has been open 60 days with no activity. Remove "Abondoned" label or comment or this will be closed in 14 days.

github-actions[bot] avatar Aug 21 '24 00:08 github-actions[bot]

This issue was closed because it has been stalled for further 14 days with no activity.

github-actions[bot] avatar Sep 04 '24 00:09 github-actions[bot]