Repository navigation
Parse SQL Server 2025 JSON syntax - #71
Merged
kyleconroy merged 1 commit intoDec 1, 2026
Merged
kyleconroy merged 1 commit into
kyleconroy merged 1 commit into
Conversation
- JSON_OBJECTAGG / JSON_ARRAYAGG, including OVER and JSON_ARRAYAGG ORDER BY - RETURNING data_type for JSON constructors and JSON_VALUE - JSON_QUERY ... WITH ARRAY WRAPPER - "key:" label spans for JSON key-value pairs (matches ScriptDom lexing) - CREATE JSON INDEX with FOR paths and OPTIMIZE_FOR_ARRAY_SEARCH - FOR JSON spans inside any parenthesized query (scalar subqueries too) Enables 12 todo tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LuRZ4JQ53XPMqUY3Yc1vdv
2 tasks done
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
Stacked on #70 (base:
claude/project-thread-4tipff-query), which is stacked on #69.Summary
Parses the SQL Server 2025 JSON syntax covered by tests added in #69:
JSON_OBJECTAGG/JSON_ARRAYAGG, withOVER (...)andJSON_ARRAYAGG(... ORDER BY ...)→FunctionCall.JsonOrderByClauseRETURNING data_typeon JSON constructors andJSON_VALUE→FunctionCall.ReturnTypeJSON_QUERY(..., path WITH ARRAY WRAPPER)→WithArrayWrapperkey:valuewherekey:has no space: ScriptDom lexes it as a label, so the key's span includes the colonCREATE JSON INDEX ... [FOR ('path', ...)] [WITH (...)]→CreateJsonIndexStatement, plus theOPTIMIZE_FOR_ARRAY_SEARCHindex optionFOR JSON/FOR XMLclause spans omit the keywords inside any parentheses (scalar subqueries as well as derived tables). The derived-table-only depth counter is replaced by a general paren depth.JSON_OBJECT / JSON_ARRAY / JSON_OBJECTAGG / JSON_ARRAYAGG now share one parser and keep the function name's original spelling.
Enables 12 todo tests (JsonFunctionTests170, JsonArrayAggOrderBy170, JsonObjectAggOverClause170, JsonIndexTests170, ComplexJsonObjectFunctionTests160/170 and baselines).
Test plan
go test ./...go test ./parser/... -check-todoenabled the 12 testsGenerated by Claude Code