DuckPGQ: Bringing SQL/PGQ to DuckDB
Proceedings of the VLDB Endowment , Volume 16 - Issue 12
We demonstrate the most important new feature of SQL:2023, namely SQL/PGQ, which eases querying graphs using SQL by introducing new syntax for pattern matching and (shortest) path-finding. We show how support for SQL/PGQ can be integrated into an RDBMS, specifically in the DuckDB system, using an extension module called DuckPGQ. As such, we also demonstrate the use of the DuckDB extensibility mechanism, which allows us to add new functions, data types, operators, optimizer rules, storage systems, and even parsers to DuckDB. We also describe the new data structures and algorithms that the DuckPGQ module is based on, and how they are injected into SQL plans.
While the demonstrated DuckPGQ extension module is lean and efficient, we sketch a roadmap to (i) improve its performance through new algorithms (factorized and WCOJ) and better parallelism and (ii) extend its functionality to scenarios beyond SQL, e.g., building and analyzing Graph Neural Networks.
|Proceedings of the VLDB Endowment|
|Structure-aware Querying & Information Retrieval on Evolving Large Graphs|
ten Wolde, D.L.J,, Boncz, P.A, & Szárnyas, G. (2023). DuckPGQ: Bringing SQL/PGQ to DuckDB. In Proceedings of the VLDB Endowment (Vol. 16). doi:10.14778/3611540.3611614