test: pin SQL surface for curate and document exactly one SELECT rule - #285
Conversation
|
👋 Hi @Prateekathub — thank you so much for your first contribution to HFlow! A maintainer will review your pull request as soon as possible. In the meantime:
💡 Tip: one open pull request per contributor at a time. Issues with an assignee are taken; everything else is fair game. We are excited to have you here and appreciate your help making the project better! 🙌 |
There was a problem hiding this comment.
DESCRIBE and SUMMARIZE pass the guard but do not produce a manifest: their output has no episode_id, and the next step refuses it. Pin them as incidental rather than supported.
TABLE episodes and VALUES (1), (2) are missing from the table and both work.
The docs line has no full stop, says curate() in a CLI section, and sits in the --sql-file paragraph.
_MULTI_STATEMENT_PAYLOADS now describes three of its rows.
|
#453 merged and settled the Rebase first. Two of your rows fail on current main, and the surface also grew: FROM-first, parenthesized SELECTs and |
Hebbian-Robotics#453 settled the DESCRIBE/SUMMARIZE question in the direction Hebbian-Robotics#279 offered: they parse as SELECT but describe columns rather than selecting episodes, so a manifest from one has no episode_id and every consumer refuses it. Both rows flip to refused, and PRAGMA and SHOW join them. Adds the rows the surface grew since: TABLE, VALUES, FROM-first and a parenthesized SELECT. The last three are the ones Hebbian-Robotics#453's first attempt refused on a text prefix, so they are the regression net for that. The list is renamed from _MULTI_STATEMENT_PAYLOADS, which described three of its thirteen rows, and carries an expected row count per row so an accepted shape pins its output and not just its admission. The refusal pattern now admits both spellings of the rule, since Hebbian-Robotics#453 gave the table-function refusals their own wording. The docs line moves out of the --sql-file paragraph, where it was a sentence fragment about the Python function in a section about CLI arguments, and into the curation section as prose.
There was a problem hiding this comment.
LGTM, merging.
Your PIVOT row and comment went in untouched; that is the one that reads like a false positive and is not.
#453 settled DESCRIBE/SUMMARIZE your way, so both flipped to refused and PRAGMA/SHOW joined them. Added the four rows the surface grew (TABLE, VALUES, FROM-first, parenthesized), gave each row an expected row count, renamed the list, and moved the docs line into the curation section.
Summary
Closes #279
Added the required documentation to CATALOG.md pinning the exactly-one-SELECT rule.
Added parameterized tests for PIVOT, DESCRIBE, and SUMMARIZE. I have decided to officially support DESCRIBE and SUMMARIZE since DuckDB parses them as SELECT, so they are marked as allowed in the tests.
Why
To fulfill the documentation and testing requirements outlined in issue #279 and ensure future developers don't accidentally remove the security guard.
Validation
Ran
uv run ruff check --fixanduv run ruff formatsuccessfully.Local
pytestexecution failed withModuleNotFoundError: No module named 'fcntl'because I am on a Windows machine, so I am relying on the GitHub Actions CI to verify the tests run successfully on Linux.Checklist
uv run ruff check --fix,uv run ruff format, anduv run ty check.