Skip to content

fix(#5): alias conformance S-1 to SELECT 1 AS one - #14

Merged
ssilvius merged 2 commits into
mainfrom
fix/5-conformance-s1-alias
Aug 3, 2026
Merged

fix(#5): alias conformance S-1 to SELECT 1 AS one#14
ssilvius merged 2 commits into
mainfrom
fix/5-conformance-s1-alias

Conversation

@ssilvius

@ssilvius ssilvius commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Conformance case S-1 asserted that SELECT 1 returns columns: ["1"], which pins the column name of an unaliased expression. SPEC 6.1 requires only that columns carry "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 reports 1, Postgres reports ?column?, MySQL reports 1). 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 one and expects columns: ["one"]

The S-1 row in the Single-statement execution table now states the SQL as SELECT 1 AS one and the expected response as 200, columns: ["one"], rows: [[1]]. Because the alias is written into the statement, every SQL engine that implements standard AS aliasing reports the same column name, so the assertion is checkable without knowing the backend. The rows: [[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

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>
@ssilvius
ssilvius merged commit 8e35e82 into main Aug 3, 2026
1 check passed
@ssilvius
ssilvius deleted the fix/5-conformance-s1-alias branch August 3, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

P1: conformance S-1 pins the column name of an unaliased expression, contradicting S6.1

1 participant