fix: share SET assignment parsing and support MySQL character set selection - #2661
Merged
manticore-projects merged 1 commit intoSep 21, 2026
Conversation
…ection Signed-off-by: minleejae <mmj9808@gmail.com>
Contributor
|
Nice refactoring, thank you! |
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.
SET @a := 1fails, while subsequent user-variable assignments are stored inside the first assignment's value list:SET @a=1, @b=2reports only one entry.SET CHARACTER SET utf8mb4is also unsupported.Share one assignment production between the first and subsequent entries, and represent punctuation with AssignmentOperator (NONE, EQUALS, COLON_EQUALS). Each top-level assignment can now be inspected and modified independently. Existing boolean useEqual methods retain their equals/no-equals behavior; the new accessors preserve
:=. Nested assignments remain inside their value expression, and PostgreSQL comma-separated setting values remain a single entry.Add CHARACTER SET/CHARSET selection with quoted names and DEFAULT, including valid combinations such as
SET CHARSET DEFAULT, @a=1. Statement punctuation continues to be shared with expression deparsers. Existing SQL Server option groups and PostgreSQL settings have regression coverage.References: MySQL SET assignments, SET CHARACTER SET.
Validation:
checkpassed on Java 17, including grammar ambiguity, formatting, static analysis, coverage and the full test suite. JUnit XML totals: 7831 tests, 0 failures/errors, 25 skipped.