cwida / duckpgq-extension

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

Using topk with multiple patterns #12

Closed Dtenwolde closed 1 month ago

Dtenwolde commented 1 year ago

What should be the result (or equivalent query of) the following query:

FROM GRAPH_TABLE (pg
MATCH SHORTEST 5 (a:Person)-[k:Knows]->*(b:Person), (b:Person)-[k2:Knows]->(c:Person)
COLUMNS (*)
SELECT * 
FROM pg
    (SELECT * 
    FROM person a, knows k, person b, knows k2, person c
    WHERE ...
    LIMIT 5
    )

I'm afraid that the LIMIT 5 will come too early and perhaps select the first 5 results of the entire join, while those might not be the 5 shortest who are then joined on the (c:Person)

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.