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

typed literals with negative sign with proper result or exception

    XMLWordPrintableJSON

Details

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

    Description

      -- !query 83
      select -integer '7'
      -- !query 83 schema
      struct<7:int>
      -- !query 83 output
      7
      
      -- !query 86
      select -date '1999-01-01'
      -- !query 86 schema
      struct<DATE '1999-01-01':date>
      -- !query 86 output
      1999-01-01
      
      -- !query 87
      select -timestamp '1999-01-01'
      -- !query 87 schema
      struct<TIMESTAMP('1999-01-01 00:00:00'):timestamp>
      -- !query 87 output
      1999-01-01 00:00:00
      

      the integer should be -7 and the date and timestamp results are confusing which should throw exception.

      Attachments

        Issue Links

          Activity

            People

              Qin Yao Kent Yao 2
              Qin Yao Kent Yao 2
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: