Parse SQL92 create column nullability - #39439
Open
iamhucong wants to merge 2 commits into
Open
Conversation
WHAT: Preserve SQL92 CREATE TABLE column nullability metadata. WHY: The grammar accepted NOT NULL and NULL options, but the visitor always reported columns as nullable. HOW: Derive the segment metadata from the parsed nullability option and add focused SQL92 regression coverage.
Contributor
Author
Code Correctness ReviewReview Result: Mergeable PR #39439 correctly preserves SQL92 Evidence
Coverage
This is a code-scope review; CI was not reviewed. |
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.
Fix SQL92
CREATE TABLEcolumn nullability metadata.Problem
The SQL92 grammar accepts column-level
NOT NULLandNULLoptions, butSQL92DDLStatementVisitor.visitColumnDefinition()always constructedColumnDefinitionSegmentwithnotNull=false.Change
notNullfrom the parsedNOT NULLoption.NOT NULLand explicitNULL.Verification
InternalSQL92ParserITpassed 207 tests.InternalSQL92ParserIT: 208 tests passed after the change.git diff --checkpassed.