cwida / duckpgq-extension

DuckDB extension that adds support for SQL/PGQ
https://duckpgq.notion.site/b8ac652667964f958bfada1c3e53f1bb?v=3b47a8d44bdf4e0c8b503bf23f1b76f2
MIT License
86 stars 7 forks source link

Incorrect lower & upper bound on element pattern with WHERE and bounded path-finding #94

Open Dtenwolde opened 9 months ago

Dtenwolde commented 9 months ago

Test in shortest_path.test

-FROM GRAPH_TABLE (snb
    MATCH p = ANY SHORTEST (a:Person where a.name = 'Daniel')-[k:knows]->{2,3}(b:Person)
    COLUMNS(element_id(p), a.name, b.name)

Potential cause: The lower and upper bounds are 1 & 1 because the previous element pattern is seen as a Subpath because of the filter.

Another query where this goes wrong

-FROM GRAPH_TABLE (pg
    MATCH
    p = ANY SHORTEST (a:Person)-[k:knows]->{2,3}(b:Person)
    COLUMNS (path_length(p), element_id(p), a.name as name, b.name as b_name)
    ) study
    order by study.name, study.b_name;
github-actions[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.