Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2944

DATE Comparison Broken

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.7.0
    • Fix Version/s: 4.9.0, 4.8.1
    • Labels:
    • Flags:
      Important

      Description

      It appears that comparisons involving the DATE type are broken. See examples below:

      > select DATE '2016-05-10 00:00:00' > DATE '2016-05-11 00:00:00';                     
      +-------+                                                                                                                          
      | true  |                                                                                                                          
      +-------+                                                                                                                          
      | true  |                                                                                                                          
      +-------+                                                                                                                          
      1 row selected (0.001 seconds)
      
      > select TIMESTAMP '2016-05-10 00:00:00' > DATE '2016-05-11 00:00:00';                
      +-------+                                                                                                                          
      | true  |                                                                                                                          
      +-------+                                                                                                                          
      | true  |                                                                                                                          
      +-------+                                                                                                                          
      1 row selected (0.001 seconds)
      
      > select DATE '2016-05-10 00:00:00' > TIMESTAMP '2016-05-11 00:00:00';                
      +-------+                                                                                                                          
      | true  |                                                                                                                          
      +-------+                                                                                                                          
      | true  |                                                                                                                          
      +-------+
      1 row selected (0.001 seconds)
      
      > select TIMESTAMP '2016-05-10 00:00:00' > TIMESTAMP '2016-05-11 00:00:00';           
      +--------+                                                                                                                         
      | false  |                                                                                                                         
      +--------+                                                                                                                         
      | false  |                                                                                                                         
      +--------+                                                                                                                         
      1 row selected (0.001 seconds)
      

        Attachments

        1. PHOENIX-2944.patch
          4 kB
          Saurabh Seth

          Activity

            People

            • Assignee:
              saurabhseth Saurabh Seth
              Reporter:
              aaronst Aaron Stephens
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: