Add dialect param to use CHAR for Utf8 unparsing for MySQL #16
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.
Which issue does this PR close?
PR addresses Utf8 unparser issue producing invalid
CAST(col AS TEXT)
SQL for MySQL.Rationale for this change
MySQL cast function does not support
TEXT
and requiresCHAR
for CAST (automatically returns VARCHAR, TEXT, LONGTEXT)Example query:
Before this change (fails in MySQL)
After this change (works in MySQL)
What changes are included in this PR?
PR introduces configurable
use_char_for_utf8_cast
dialect parameter that contolrs wherther CHAR vs TEXT/VARCHAR is using for Utf8 unparsing.Are these changes tested?
Yes, added unit tests + manual testing
Are there any user-facing changes?
CustomDialogBuilder
now supportsuse_char_for_utf8_cast
that can be used to specify whether CHAR vs TEXT/VARCHAR data type should be used for Utf8 unparsing.