You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Curation preview rejects queries ending in a line comment #738
Curation preview rejects valid SQL ending in a line comment, while the report endpoint and hflow.curate() accept it. On main at 7d202bc, against an empty catalog:
SQL
POST /api/v1/curation/preview
POST /api/v1/curation/report
SELECT 1 AS value
200, one row
200, one row
SELECT 1 AS value -- end
400, parser error
200, one row
SELECT 1 AS value; -- end
400, parser error
200, one row
packages/hflow-server/src/hflow_server/_curation.py:149 removes semicolons only at the end of the string. Preview embeds the SQL in a subquery at lines 259 and 285–304, so a final line comment also swallows the wrapper's closing syntax.
Done when
Preview accepts those two commented queries and returns the same row and count as the uncommented query, with and without stats: true.
Semicolons and comments inside strings, including non-ASCII text, retain their meaning. Multi-statement SQL remains refused before execution.
Add outcome-focused coverage to packages/hflow-server/tests/test_server_curation_preview.py:17. The SDK's handling of a statement terminator is at src/hflow/curation.py:713, and its SQL surface cases are in tests/test_catalog_curation.py.
Validation
uv sync --locked
uv run ruff check --fix
uv run ruff format
uv run ty check
uv run pytest -q
Activity
fix(server): accept curation preview SQL that ends in a comment (Hebb…