Skip to content

fix: preserve JSON_TABLE EXISTS column order - #2682

Open
minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/json-table-exists-order
Open

minleejae wants to merge 1 commit into
JSQLParser:masterfrom
minleejae:fix/json-table-exists-order

Conversation

@minleejae

@minleejae minleejae commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Typed JSON_TABLE EXISTS columns currently render n EXISTS INT PATH '$.n', although the parser and MySQL expect n INT EXISTS PATH '$.n'. Emit EXISTS in the same position as the grammar, after the type and its modifiers.

Tests cover typed and nested columns, existing untyped Oracle forms, inspecting and editing the column AST, programmatic construction, both renderers, and reparsing. This is a shared rendering fix and does not require a dialect setting.

Validation: ./gradlew check passed (8,148 tests, 25 skipped). Three SELECT/CREATE TABLE AS reproductions were executed on MySQL 8.4.11 before and after rendering, with identical results.

Reference: MySQL JSON_TABLE column syntax.

Combined validation with #2682, #2683, #2684, #2685 and #2686: all five changes merge without conflicts; the integrated ./gradlew check passes (8,190 tests, 25 skipped). All 254 MySQL 8.4.11 fixtures parse, render and reparse, and execute with results identical to the original SQL.

Signed-off-by: minleejae <mmj9808@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant