forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-48715][SQL] Integrate UTF8String validation into collation-awa…
…re string function implementations ### What changes were proposed in this pull request? Use our own invalid UTF-8 byte sequence replacement logic in UTF8String, before all `.toString()` method calls. ### Why are the changes needed? Avoid relying on Java to perform invalid UTF-8 byte sequence replacement, and ensure consistent results. ### Does this PR introduce _any_ user-facing change? Yes, collation aware string function implementations will now rely on our own invalid UTF-8 string replacement implementation, instead of Java's. ### How was this patch tested? Existing tests, with some changes in `UTF8StringSuite` and `CollationSupportSuite`. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#47131 from uros-db/make-valid. Authored-by: Uros Bojanic <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
- Loading branch information
Showing
4 changed files
with
155 additions
and
47 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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