-
-
Notifications
You must be signed in to change notification settings - Fork 231
dolthub/dolt#9511 - Fix SET type casting to CHAR and BINARY #3114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
f632188
to
f6d221d
Compare
Can you also check how enums convert with cast (if we don't already have a test for it) and add tests if necessary? |
bea598f
to
83bba9b
Compare
angelamayxie
approved these changes
Jul 24, 2025
This commit fixes an issue where SET types were not properly converted to their string representation when casting to CHAR or BINARY types. The problem was that SET types use internal uint64 values to represent bit fields, but when casting to CHAR or BINARY, the string representation of the SET should be used instead. Changes: - Added special handling in convertValue() for SET types in both CHAR and BINARY conversion cases - Convert SET uint64 bit field to string representation before passing to LongText/LongBlob converters - Removed Skip flags from previously failing tests in script_queries.go - Updated test expectations to include all SET values (including "defg") Fixes dolthub/dolt#9511 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…NUM casting - Extend TypeAwareConversion to handle IsBlobType in addition to IsTextOnly - Use TypeAwareConversion consistently for both CHAR and BINARY conversions - Remove direct ConvertToCollatedString call in binary conversion - Update function documentation to reflect blob type support - Simplify convertValue logic by using unified conversion approach This ensures SET/ENUM types are converted properly for all string and binary target types through a single, consistent code path. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
f2fa7f7
to
656d0b8
Compare
angelamayxie
approved these changes
Jul 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
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#9511