You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2022/04/07 18:47:00 UTC

[jira] [Commented] (SPARK-37047) Add overloads for lpad and rpad for BINARY strings

    [ https://issues.apache.org/jira/browse/SPARK-37047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519094#comment-17519094 ] 

Apache Spark commented on SPARK-37047:
--------------------------------------

User 'anchovYu' has created a pull request for this issue:
https://github.com/apache/spark/pull/36103

> Add overloads for lpad and rpad for BINARY strings
> --------------------------------------------------
>
>                 Key: SPARK-37047
>                 URL: https://issues.apache.org/jira/browse/SPARK-37047
>             Project: Spark
>          Issue Type: New Feature
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Menelaos Karavelas
>            Assignee: Menelaos Karavelas
>            Priority: Major
>             Fix For: 3.3.0
>
>
> Currently, `lpad` and `rpad` accept BINARY strings as input (both in terms of input string to be padded and padding pattern), and these strings get cast to UTF8 strings. The result of the operation is a UTF8 string which may be invalid as it can contain non-UTF8 characters.
> What we would like to do is to overload `lpad` and `rpad` to accept BINARY strings as inputs (both for the string to be padded and the padding pattern) and produce a left or right padded BINARY string as output.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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