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

Error when non-unique vertices are detected during CSR creation #140

Closed Dtenwolde closed 2 months ago

Dtenwolde commented 2 months ago

Fixes #139 This PR now ensures an error is thrown when non-unique vertices are detected during the creation of the CSR. We verify if the sum of the create_csr_vertex UDF equals the number of edges in the edge table. If this is not the case, it points to duplicate edges, causing the sum to be larger than the edge count.

The following error will be thrown: Constraint Error: Non-unique vertices detected. Make sure all vertices are unique for path-finding queries.

Other options that were considered: