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

Discrepancy between TIMESTAMP_SECONDS and cast from float

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.1.2, 3.2.0
    • Component/s: SQL
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: