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

Support `SimpleDateFormat` and `FastDateFormat` as legacy date/timestamp formatters

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • SQL
    • None

    Description

      To be absolutely sure that Spark 3.0 is compatible with 2.4 when spark.sql.legacy.timeParser.enabled is set to true, need to support SimpleDateFormat and FastDateFormat as legacy parsers/formatters in TimestampFormatter.

      Spark 2.4.x uses the following parsers for parsing/formatting date/timestamp strings:

      1. DateTimeFormat in CSV/JSON datasource
      2. SimpleDateFormat - is used in JDBC datasource, in partitions parsing.
      3. SimpleDateFormat in strong mode (lenient = false). It is used by the date_format, from_unixtime, unix_timestamp and to_unix_timestamp functions.

      Spark 3.0 should use the same parsers in those cases.

      Attachments

        Issue Links

          Activity

            People

              maxgekk Max Gekk
              maxgekk Max Gekk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: