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

DATE Comparison Broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 4.7.0
    • 4.9.0, 4.8.1
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: