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

to_date with format has weird behavior

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • SQL

    Description

      Today, if we run

      SELECT to_date('2015-07-22', 'yyyy-dd-MM')
      

      will result to `2016-10-07`, while running

      SELECT to_date('2014-31-12')   # default format
      

      will return null.

      this behavior is weird and we should check other systems like hive to see if this is expected.

      Attachments

        Activity

          People

            windpiger Song Jun
            cloud_fan Wenchen Fan
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: