fix(#5): alias conformance S-1 to SELECT 1 AS one - #14
Merged
Conversation
S-1 asserted `SELECT 1` yields `columns: ["1"]`, but SPEC 6.1 only requires column names "in the order produced by the SQL engine" -- the name of an unaliased expression is engine-specific. Aliasing to `SELECT 1 AS one` makes the expected `columns: ["one"]` a dialect-free assertion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 task
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.
Summary
Conformance case S-1 asserted that
SELECT 1returnscolumns: ["1"], which pins the column name of an unaliased expression. SPEC 6.1 requires only thatcolumnscarry "the column names of the result, in the order produced by the SQL engine" -- it deliberately says nothing about how an engine names an unaliased expression, and engines disagree (SQLite reports1, Postgres reports?column?, MySQL reports1). A conformance case that pins that name would fail conforming servers for a dialect reason, contradicting the dialect-free ruling. The fix aliases the expression so the expected column name is determined by the SQL text rather than by the engine.Acceptance criteria mapping
1. S-1 uses
SELECT 1 AS oneand expectscolumns: ["one"]The S-1 row in the Single-statement execution table now states the SQL as
SELECT 1 AS oneand the expected response as200, columns: ["one"], rows: [[1]]. Because the alias is written into the statement, every SQL engine that implements standardASaliasing reports the same column name, so the assertion is checkable without knowing the backend. Therows: [[1]]part is unchanged -- the value was never in dispute, only the name. No other case, spec section, or reference server hardcoded a column name for this query, so this row was the only place needing the change.Evidence: conformance/README.md:38 now reads
| S-1 |SELECT 1 AS one| 200,columns: ["one"],rows: [[1]]|, consistent with the contract stated at SPEC.md:117.Not done
I did not add prose to the conformance doc explaining that unaliased expression names are engine-defined, nor did I add a new optional/"nice to have" bullet covering that behavior. The issue scoped this to the S-1 row, and the reason the row changed is already captured in the commit message and here; adding normative-sounding commentary to the conformance doc risks implying a rule the spec does not state. I also did not audit the other cases (S-2 through P-6) for latent dialect assumptions or touch SPEC.md, the reference servers, or implementations.md -- those are separate concerns and belong in their own issues if any exist.
Closes #5