Skip to content

[CALCITE-7820] nonReservedKeywordsToRemove in parser config.fmpp is documented but never consumed by Parser.jj - #5358

Open
dajiaohuang wants to merge 1 commit into
apache:mainfrom
dajiaohuang:fix/calcite-7820-nonreserved-removal-w17
Open

dajiaohuang wants to merge 1 commit into
apache:mainfrom
dajiaohuang:fix/calcite-7820-nonreserved-removal-w17

Conversation

@dajiaohuang

Copy link
Copy Markdown

Jira Link

CALCITE-7820

Changes Proposed

Setting nonReservedKeywordsToRemove: ["ADD"] currently leaves ADD usable as an unquoted identifier, contrary to the documented parser configuration contract.

Filter the combined base and added non-reserved keyword list before splitting it into the three grammar productions. This makes removal take effect while preserving the existing configuration fallbacks and partitioning.

The generated extension-parser regression checks reserved-word metadata, rejection of unquoted ADD, AFTER, and BEFORE, acceptance of their quoted forms, and continued acceptance of the unaffected KEY identifier.

Validation:

  • The new regression fails on the original template (ADD is not reserved).
  • :core:test --tests '*ExtensionSqlParserTest': successful, 520 tests, 0 failures, 3 skipped.
  • ./gradlew build: successful, 413 tasks, with no test exclusions added. Local fixture tests used the default configuration; optional external integrations were not enabled.

AI assistance: OpenAI Codex helped implement and validate this change.

…ocumented but never consumed by Parser.jj

Filter the combined non-reserved keyword list before splitting it into
three grammar productions. Test reserved-word metadata, unquoted rejection,
quoted acceptance and an unchanged non-reserved keyword.

Generated-by: OpenAI Codex
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