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

ISO DateTime parser is too strict

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.2.2, 1.3.1, 1.4.1, 1.5.0
    • 1.6.0
    • SQL
    • None

    Description

      The DateTime parser requires 3 millisecond digits, but that is not part of the official ISO8601 spec.

      https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala#L132

      https://en.wikipedia.org/wiki/ISO_8601

      This results in the following exception when trying to parse datetime columns

      java.text.ParseException: Unparseable date: "0001-01-01T00:00:00GMT-00:00"
      

      joshrosen rxin

      Attachments

        Issue Links

          Activity

            People

              kevincox Kevin Cox
              alexangelini Alex Angelini
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: