feat(parser): add column data type fragment parser - #2531
Open
minleejae wants to merge 1 commit into
Open
Conversation
Expose strict CCJSqlParserUtil helpers for ColDataType fragments, including parser configuration and full-input validation.
minleejae
force-pushed
the
feat/parse-column-data-type
branch
from
September 3, 2026 06:26
8753b98 to
a0556bd
Compare
minleejae
marked this pull request as ready for review
September 3, 2026 07:05
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.
What
CCJSqlParserUtil.parseColDataType(String).Consumer<CCJSqlParser>for dialect and feature settings.ENUMarguments, parser configuration, null/empty input, and partial-input rejection.Why
ColDataType()is available on the generated parser, but there is no publicCCJSqlParserUtilentry point for applications that receive a type fragment rather than a complete DDL statement. Such applications currently need to instantiate the generated parser directly or wrap the fragment in synthetic DDL.The strict EOF check is important for type fragments: returning
varchar(255)fromvarchar(255) NOT NULLwould silently discard meaningful input.API example
Testing
./gradlew checkCCJSqlParserUtilTest.AI assistance
OpenAI Codex was used to review existing parser utility conventions, prepare the API and tests, and run validation. The generated change was reviewed for strict full-input behavior and compatibility with parser configuration.