[SPARK-55991] Fix unicode related SQL text corruption with parameters#54798
Closed
srielau wants to merge 2 commits intoapache:masterfrom
Closed
[SPARK-55991] Fix unicode related SQL text corruption with parameters#54798srielau wants to merge 2 commits intoapache:masterfrom
srielau wants to merge 2 commits intoapache:masterfrom
Conversation
dejankrak-db
approved these changes
Mar 14, 2026
cloud-fan
approved these changes
Mar 14, 2026
cloud-fan
pushed a commit
that referenced
this pull request
Mar 14, 2026
### What changes were proposed in this pull request? Fix parameter substitution code to be mindful of unicode supplemental characters ### Why are the changes needed? Emojies (and other special characters) cause corruption of the SQL text if parameter markers are substiution due to offset issues. codepoint vs character ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Wrote new testcases ### Was this patch authored or co-authored using generative AI tooling? YEs Claude Opus 4.6 high Closes #54798 from srielau/emoji. Authored-by: Serge Rielau <serge@rielau.com> Signed-off-by: Wenchen Fan <wenchen@databricks.com> (cherry picked from commit 4d79768) Signed-off-by: Wenchen Fan <wenchen@databricks.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.
What changes were proposed in this pull request?
Fix parameter substitution code to be mindful of unicode supplemental characters
Why are the changes needed?
Emojies (and other special characters) cause corruption of the SQL text if parameter markers are substiution due to offset issues. codepoint vs character
Does this PR introduce any user-facing change?
No
How was this patch tested?
Wrote new testcases
Was this patch authored or co-authored using generative AI tooling?
YEs Claude Opus 4.6 high