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

Support CAST (... FORMAT <pattern>) expression

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: In Progress
    • Minor
    • Resolution: Unresolved
    • 3.1.0
    • None
    • SQL
    • None

    Description

      SQL:2016 standard supports the following Cast functions

      CAST(<datetime> AS <char string type> [FORMAT <template>])
      CAST(<char string> AS <datetime type> [FORMAT <template>])
      

      to specify patterns to use during cast.

      Oracle DB 18 already supports a similar formatting option during cast: https://docs.oracle.com/en/database/oracle/oracle-database/18/sqlrf/CAST.html

      There is an initiative in Impala: IMPALA-4018 and Hive HIVE-21575 to support.
      (Please note that accepting the CAST (... FORMAT <pattern>) is just one part of these tickets, the other part regarding patterns is covered here: SPARK-27882.)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              petertoth Peter Toth
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: