danny0405 commented on a change in pull request #706: [CALCITE-2302] Implicit 
type cast support
URL: https://github.com/apache/calcite/pull/706#discussion_r314590031
 
 

 ##########
 File path: core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java
 ##########
 @@ -2952,7 +2952,7 @@ private void 
checkReduceNullableToNotNull(ReduceExpressionsRule rule) {
     // in addition to the casts.
     checkPlanning(program,
         "select * from emp "
-            + "where cast((empno + (10/2)) as int) = 13");
+            + "where cast((empno + (10/2)) as double) = 13");
 
 Review comment:
   This behavior is very relative with the SQL dialect, except for `POSTGRE 
SQL`, almost all the other sql engines would produce a `DECIMAL` or `DOUBLE` 
for 2 integers divide, i.3. `2/4` returns o.5 instead of 0.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to