Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-37047

Add overloads for lpad and rpad for BINARY strings

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      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.

      Attachments

        Activity

          People

            mkaravel Menelaos Karavelas
            mkaravel Menelaos Karavelas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: