Repository navigation
docs(parity): file P37/P38, restore skipped examples, triage the smoke suite - #63
Merged
Merged
Conversation
…e suite
Examples smoke failures were being cleaned up by deleting or editing the
offending SQL. That erased the evidence: three statements removed last night
were each demonstrating a real, open engine gap. Restore them behind the
statement-level `-- [SKIP]` directive instead, so the queries stay in the tree
as end-to-end acceptance tests without reddening the run.
Restored and marked:
- chemistry.sql OR in JOIN ... ON (P27, open)
- jsonl_logs.sql ORDER BY ... NULLS LAST (P13 stage 2, open)
- statistical_analysis.sql scalar subquery in a CTE (P38, new)
Two new findings, both with corpus cases and DuckDB reference behaviour
confirmed:
P37 - a window function inline in WHERE returns ZERO rows, with a success
exit code and no error. DuckDB rejects the query outright. Silent
wrong answer, so it leads the open fix order. Shares a fix site with
P15 (ExpressionLifter only walks the SELECT list), so the two are one
piece of work. Found in expander_rewriters.sql, which advertises this
as a working transformation.
P38 - a scalar subquery in a CTE body's SELECT list is never evaluated.
Narrower than it first appeared: two controls show the same expression
works at the top level, and that plain arithmetic works inside a CTE.
Two SELECT-list evaluation paths disagree on which expression types
they support - check ENGINE_REFACTORING.md before adding the arm twice.
Triage of the smoke suite: 13 failures -> 1. Twelve examples need a live
server, post to placeholder hosts, or are nvim-plugin macro templates that
contain no runnable SQL; all are marked with file-level `-- [TEST:SKIP]` plus
the reason. expander_rewriters is deliberately left failing - it is P26, a real
gap, and skipping it would bury it. Smoke failures are already non-blocking, so
CI stays green while the bug stays visible.
Parity contract holds at 172 cases (141 AGREE). All 33 formal example tests
pass. No Rust changed.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01PpidyXocQt835yaJpKBSHk
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Examples smoke failures were being cleaned up by deleting or editing the offending SQL. That erased the evidence: three statements removed in
2240b73/676309fwere each demonstrating a real, open engine gap. This restores them behind the statement-level-- [SKIP]directive so the queries stay in the tree as end-to-end acceptance tests without reddening the run.No Rust changed.
Restored and marked
chemistry.sqlORinJOIN ... ONjsonl_logs.sqlORDER BY ... NULLS LASTstatistical_analysis.sql-- [SKIP]is checked innon_interactive.rsbefore parsing, so unparseable SQL behind it costs nothing. EachP*entry gained an Acceptance test line pointing at the example, so whoever picks the fix up knows where the end-to-end check lives.For
jsonl_logs.sqlthe NULLS-free statement still runs and the original sits beside it skipped — the demo and the tracked gap, both. Also reverts an unintended whitespace change from2240b73.Two new findings
Both have corpus cases; both reference behaviours were confirmed against DuckDB rather than assumed.
P37 — a window function inline in
WHEREsilently returns zero rows. Success exit code, header printed, no error, on a 20-row table. DuckDB rejects the query outright (Binder Error: WHERE clause cannot contain window functions). BucketedOURS_ONLYbecause we "succeed" where the reference errors — the bucket is right, the behaviour is not.It is a sibling of P15 with one fix site:
ExpressionLifteronly walks the SELECT list, so an inline window is never hoisted and reachesrecursive_where_evaluator.rsas a rawWindowFunction. From QUALIFY that path errors (P15); from WHERE it filters every row out instead. Silent, so it leads the open fix order. Found inexpander_rewriters.sql, which advertises this as a working transformation.P38 — a scalar subquery in a CTE body's SELECT list is never evaluated. Narrower than it first appeared; two controls locate it:
amount - (SELECT AVG(…))(SELECT AVG(…))in a CTE, no arithmeticamount * 2inside a CTENeither scalar subqueries nor CTE arithmetic is broken in general — two SELECT-list evaluation paths disagree on which expression types they support. The entry flags checking
ENGINE_REFACTORING.mdbefore adding the arm twice.Smoke suite triage: 13 failures → 1
Twelve examples can never run in CI — they need a live server, post to placeholder hosts (
api.example.com,tradesapi,trade-server), or are nvim-plugin macro templates (one contains no runnable statement at all). All now carry file-level-- [TEST:SKIP] <reason>, whichtest_examples.py::should_skip_filereads and reports.expander_rewritersis deliberately left failing — it is P26, a real gap, and skipping it would bury it. Smoke failures are already non-blocking (the suite exits 0), so CI stays green while the bug stays visible.Verification
cargo fmt/clippydelta.🤖 Generated with Claude Code
https://claude.ai/code/session_01PpidyXocQt835yaJpKBSHk