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

Allow multiple MATCH statements within a single query #88

Closed Dtenwolde closed 5 months ago

Dtenwolde commented 9 months ago

There can only be one MATCH statement in a single query. It should be possible to have multiple MATCH statements, of which the results can be joined using the cross-product. This would be similar to a subquery

https://github.com/cwida/duckpgq-experiments/issues/27

Dtenwolde commented 8 months ago

Right now we save the result of the TransformMatchNode in parse_data, which can only store one node. However, a query can contain more than 1, in which case this method fails. A suggestion was made to not store the data in parse_data, but serialize the node and add it as a BLOB argument to the node in the logical query plan (something along these lines). Then we later deserialize the node whenever we reach it.