You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by "Aaron Stephens (JIRA)" <ji...@apache.org> on 2016/05/26 22:21:12 UTC

[jira] [Created] (PHOENIX-2944) DATE Comparison Broken

Aaron Stephens created PHOENIX-2944:
---------------------------------------

             Summary: DATE Comparison Broken
                 Key: PHOENIX-2944
                 URL: https://issues.apache.org/jira/browse/PHOENIX-2944
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.7.0
            Reporter: Aaron Stephens
            Priority: Critical


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

{noformat}
> 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)
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)