You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/07/06 20:20:00 UTC

[jira] [Updated] (SPARK-57747) Fix translate() to distinguish deletion from literal U+0000 replacement

     [ https://issues.apache.org/jira/browse/SPARK-57747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated SPARK-57747:
-----------------------------------
    Labels: pull-request-available  (was: )

> Fix translate() to distinguish deletion from literal U+0000 replacement
> -----------------------------------------------------------------------
>
>                 Key: SPARK-57747
>                 URL: https://issues.apache.org/jira/browse/SPARK-57747
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 4.2.0
>            Reporter: Spyros Pavlatos
>            Priority: Major
>              Labels: pull-request-available
>
> {{translate}} currently treats {{U+0000}} ({{{}\u0000{}}}, {{{}X'00'{}}}) as a deletion marker in its internal mapping logic. Because of this, a valid request to replace a character with a literal NUL is misinterpreted as “delete this character,” producing length 0 instead of length 1 output for that position.
> This ticket fixes that specific ambiguity so literal {{U+0000}} replacement is preserved as data, not interpreted as delete. The change should be applied consistently across Catalyst dictionary construction, {{{}UTF8String.translate{}}}, and any codegen/collation translate paths, with regression tests that assert {{translate(..., ..., '\u0000')}} emits a real NUL character.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org