Fix enum DEFAULT NULL validation in analyzer#3085
Merged
Conversation
ccc8fc8 to
60f43a5
Compare
jycor
approved these changes
Jul 10, 2025
Contributor
jycor
left a comment
There was a problem hiding this comment.
LGTM, add an enginetest for this case
- Add missing case for NULL values in validateEnumLiteralDefault function - MySQL allows DEFAULT NULL for enum columns, but analyzer was rejecting it - This fixes CREATE TABLE statements with enum columns that have DEFAULT NULL - Resolves "incompatible type for default value" error for valid enum defaults 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added 'enum import error message validation' test to verify proper error format - Added 'enum default null validation' test to verify DEFAULT NULL works for enums - These tests correspond to the failing bats tests in auto-bump PR #9491 - Both tests pass and validate the enum fixes are working correctly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
01ae336 to
3d587cb
Compare
86d4e7a to
fb1f8d6
Compare
Need to fix error type to match MySQL exactly - should return ErrInvalidColumnDefaultValue instead of ErrIncompatibleDefaultType. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Fixes dolthub/dolt#9491
Fix enum DEFAULT NULL validation