Repository navigation
Preserve stored output types when casting for numeric ordering - #353
Draft
seyoung4503 wants to merge 2 commits into
Draft
seyoung4503 wants to merge 2 commits into
seyoung4503 wants to merge 2 commits into
Conversation
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.
A query for the latest stored frame year returned the right year and count but changed the year from its stored TEXT value to INTEGER. BIRD's unchanged native-tuple evaluator treats those values as different. Clarify the existing output-representation guidance: preserve stored projected values unless conversion is requested; a cast needed only for numeric ordering belongs in ORDER BY, not automatically in SELECT.
Tool-first diagnosis confirmed that MCP executed and returned exactly the model's SQL. The executor did not change types. Before:integer2015,count820; reference:string"2015",count820. An offline projection-only cast removal matches native reference tuples. This is a representation mismatch, not an incorrect business count. The grader, DB, reference and denominator stay unchanged; no implicit result coercion is added.
One original failed case is rerun fresh with Astra/high through ChatGPT-auth Codex→Lang2SQL MCP, frozen88f3d1. No reference, previous attempt or counterfactual SQL enters model input. The product change is one existing instruction bullet; no new functions/tools/runtime paths. Original broad BIRD execution continues on0c79539.
Validation:339 root tests passed,1 skipped. Scoped Ruff passes excluding the existing unrelated BLE001 in this prompt module; diff checks pass. No CODE MAP generator exists. The source branch is based directly on0c79539 to isolate this change from later share-unit guidance.
Selected-case official result:bird086 repaired0→1 (1/1). New SQL projects original frameVersion and casts only ORDER BY; result is now(string"2015",820). It also uses non-empty ID checks; baseline profiling observed no blank IDs. This is one stochastic selected-case repair, not full accuracy or deterministic enforcement. Keep draft pending broader integration/validation.
Exact original prompt bytes match. Archive:
bench/accuracy/mcp-review-results/sort-value-types/,24verified hashes, raw before/after traces, SQL/CSV, paired HTML/JSON comparison and offline native-type diagnosis. Original checkpoint004 remains92/94; the separate repair does not rewrite its score.