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

Wrong results of getting time components before 1582 year

    XMLWordPrintableJSON

Details

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

    Description

      Here are example that show the issues:

      spark-sql> select hour(timestamp '0010-01-01 00:00:00');
      23
      spark-sql> select minute(timestamp '0010-01-01 00:00:00');
      52
      spark-sql> select second(timestamp '0010-01-01 00:00:00');
      58
      spark-sql> select date_part('milliseconds', timestamp '0010-01-01 00:00:00');
      58000.000
      spark-sql> select date_part('microseconds', timestamp '0010-01-01 00:00:00');
      58000000
      

      The expected results must be:

      • hour = 0
      • minute = 0
      • second = 0
      • milliseconds = 0
      • microseconds = 0

      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: