kasakrisz commented on code in PR #5505:
URL: https://github.com/apache/hive/pull/5505#discussion_r1922434938


##########
ql/src/test/queries/clientpositive/distributeby.q:
##########
@@ -0,0 +1,24 @@
+create table t1 (a string, b int);
+
+insert into t1 values ('2014-03-14 10:10:12', 10);
+
+-- distribute by
+explain cbo
+select * from t1 where a between date_add('2014-03-14', -1) and '2014-03-14' 
distribute by a;

Review Comment:
   On the non-cbo path implict type conversion from string to date is not 
performed:
   ```
                   TableScan
                     alias: t1
                     filterExpr: a BETWEEN DATE'2014-03-13' AND '2014-03-14' 
(type: boolean)
   ```
   vs
   ```
                   TableScan
                     alias: t1
                     filterExpr: CAST( a AS DATE) BETWEEN DATE'2014-03-13' AND 
DATE'2014-03-14' (type: boolean) 
   ```
   In this query this can lead to data correctness when vectorization is turned 
off.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to