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

Discrepancy between TIMESTAMP_SECONDS and cast from float

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.2.0
    • 3.1.2, 3.2.0
    • SQL
    • None

    Description

      TIMESTAMP_SECONDS and CAST(<float> AS TIMESTAMP) have different results:

      spark-sql> SELECT CAST(16777215.0f AS TIMESTAMP);
      1970-07-14 07:20:15
      spark-sql> SELECT TIMESTAMP_SECONDS(16777215.0f);
      1970-07-14 07:20:14.951424
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: