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

Add the TO_BINARY() function

    XMLWordPrintableJSON

Details

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

    Description

      to_binary(expr, fmt) is a common function available in many other systems to provide a unified entry for string to binary data conversion, where fmt can be utf8, base64, hex and base2 (or whatever the reverse operation to_char()supports).

      https://docs.aws.amazon.com/redshift/latest/dg/r_TO_VARBYTE.html

      https://docs.snowflake.com/en/sql-reference/functions/to_binary.html

      https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators#format_string_as_bytes

      https://docs.teradata.com/r/kmuOwjp1zEYg98JsB8fu_A/etRo5aTAY9n5fUPjxSEynw

      Related Spark functions: unbase64, unhex

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            maxgekk Max Gekk
            Max Gekk Max Gekk
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: