Repository navigation
Update ScriptDom to 180.154.0 and sync upstream tests - #69
Merged
Merged
Conversation
Bump Microsoft.SqlServer.TransactSql.ScriptDom from 170.128.0 to 180.154.0 and generate goldens with TSql180Parser (TSqlFabricDWParser for *FabricDW tests) instead of TSql160Parser. Sync test scripts from microsoft/SqlScriptDOM@3ea69b6: 74 new tests, 22 updated query.sql files. Regenerate every ast.json the official parser accepts. 48 tests previously marked invalid_syntax now parse. Parser/marshal changes to match ScriptDom 180 output: - TSqlScript.TrailingGoCount - OrderByClause.All / AllSortOrder - TopRowFilter.WithApproximate, OffsetClause.WithApproximate - VECTOR(n[, type]) -> VectorDataTypeReference (also in DECLARE) - datepart argument of DATEADD/DATEDIFF/DATEPART/... -> IdentifierLiteral - REGEXP_MATCHES / REGEXP_SPLIT_TO_TABLE -> GlobalFunctionTableReference 29 of the new tests pass and are enabled; the rest are marked todo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRZ4JQ53XPMqUY3Yc1vdv
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRZ4JQ53XPMqUY3Yc1vdv
This was referenced Dec 1, 2026
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.
Requested by Kyle · project thread
Summary
Bumps the SQL Server parser we test against from ScriptDom 170.128.0 / TSql160Parser to 180.154.0 / TSql180Parser (the newest on NuGet), and syncs the test corpus with microsoft/SqlScriptDOM@3ea69b6.
Tooling
TsqlAstParsernow references ScriptDom 180.154.0 and usesTSql180Parser, orTSqlFabricDWParserfor*FabricDWtests (mirroring upstream's test layout)..github/workflows/test.yml) now runs on every pull request, not only PRs targetingmain, so stacked PRs get checks.CLAUDE.mddocuments the new version and how tests map to upstreamTestScripts/,Baselines*/andPhaseOneTestScripts/.Test corpus
query.sqlfiles where upstream added cases (PhaseOne scripts intentionally keep the first invalid line stripped).ast.jsonthe official parser accepts (886 existing goldens). PhaseOne goldens are hand-written and the full parser rejects them, so they're unchanged.invalid_syntax(SQL 2025 / Fabric DW features that TSql160 couldn't parse) now have goldens.todo(46 distinct features: AI functions, external models, JSON functions/indexes, vector index/search,ORDER BY ALL,TOP ... WITH APPROXIMATE, Fabric DW CLONE/CLUSTER BY, etc.).Parser changes to match ScriptDom 180 output
TSqlScript.TrailingGoCount(number ofGOseparators after the last batch). The test harness ignores it for legacy hand-written goldens that predate it.OrderByClause.All/AllSortOrder.TopRowFilter.WithApproximate,OffsetClause.WithApproximate.VECTOR(n [, type])now parses toVectorDataTypeReference;DECLAREnow accepts anyDataTypeReference.DATEADD/DATEDIFF/DATEDIFF_BIG/DATENAME/DATEPART/DATETRUNC/DATE_BUCKETbecomes anIdentifierLiteral(ScriptDom'sNormalizeDatePartFunctionFirstParameter).REGEXP_MATCHES/REGEXP_SPLIT_TO_TABLEinFROMproduceGlobalFunctionTableReference.Test plan
go test ./...passesgo test ./parser/... -check-todoenabled the 29 passing new testshttps://claude.ai/code/session_01LuRZ4JQ53XPMqUY3Yc1vdv
Generated by Claude Code