cldellow / datasette-parquet

Add DuckDB, Parquet, CSV and JSON lines support to Datasette
Apache License 2.0
44 stars 5 forks source link

Fixes error in parameters of prepared statements during rewrite #24

Open larsyencken opened 1 month ago

larsyencken commented 1 month ago

Fixes #23

The dependencies for this package are unpinned. sqlglot upstream changed their rewriting to do more, so this package now needs to do a little less.

This commit removes some rewriting that was failing with recent package versions, and pins sqlglot >= 21.2 in setup.py.

In doing so, it gets table display working again in Datasette.

marcelgerber commented 1 month ago

For more context, since I helped Lars on this: sqlglot is now rewriting :param to $param already (see PR: https://github.com/tobymao/sqlglot/pull/2991) since version 21.2 (Feb 2024).

This means that datasette-parquet's parameter handling needs to take that into account.