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

to_timestamp should allow numeric types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • SQL
    • None

    Description

      SPARK-38240 mistakenly disallowed numeric type at to_timestamp. We should allow it back:

      spark.range(1).selectExpr("to_timestamp(id)").show()
      

      Before

      +-------------------+
      |   to_timestamp(id)|
      +-------------------+
      |1970-01-01 09:00:00|
      +-------------------+
      

      After

      +-----------------+
      | to_timestamp(id)|
      +-----------------+
      |             null|
      +-----------------+
      

      Attachments

        Activity

          People

            gurwls223 Hyukjin Kwon
            gurwls223 Hyukjin Kwon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: