Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3433

EQUALS operator between date/timestamp types returns false if the type is nullable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.17.0, 1.18.0, 1.19.0, 1.20.0, 1.21.0
    • 1.22.0
    • core

    Description

      sql

      select time0 = time1
      from (select
                  timestamp'2000-12-30 21:07:32' as time0,
                  timestamp'2000-12-30 21:07:32' as time1
                union all
                select
                  cast(null as timestamp) as time0,
                  cast(null as timestamp) as time1)
      

      answer is false

      but 

      sql

      select time0 = time1
      from
      (select
        timestamp'2000-12-30 21:07:32' as time0,
        timestamp'2000-12-30 21:07:32'as time1)
      

      answer is true

       

      Attachments

        Issue Links

          Activity

            People

              donnyzone Feng Zhu
              jiezouSH jiezouSH
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 20m
                  2h 20m