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

Support SQL:2016 compatible datetime patterns

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.1.0
    • None
    • SQL
    • None

    Description

      Date and time related functions in Spark use DateTimeFormatter to parse and format dates where a pattern is defined. Unfortunately, it is not entirely compatible with the SQL:2016 standard.

      There is an initiative in Impala: IMPALA-4018 and Hive HIVE-21575 to support SQL:2016 patterns as both these systems lack this feature currently.
      The Impala design document and compatibility matrix created by gaborkaszab covers how the compliance with the standard can be achieved and how do other databases support this standard. I believe these documents are very useful for Spark community as well.
      Since Hive is also JVM based I also see an option to share some code that does the parsing/formatting according to the standard.

      (Please note that format patterns are just one part of these tickets, the other part about `CAST (... FORMAT <pattern>)` function, which is also part of the SQL:2016 standard, is covered here: SPARK-27881)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: