mihaibudiu commented on code in PR #4512:
URL: https://github.com/apache/calcite/pull/4512#discussion_r2314908021


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -14497,11 +14497,11 @@ void testTimestampDiff(boolean coercionEnabled) {
     MONTH_VARIANTS.forEach(s ->
         f.checkScalar("timestampdiff(" + s + ", "
                 + "time '12:42:25', date '2016-06-14')",
-            "-1502389", "INTEGER NOT NULL"));
+            "557", "INTEGER NOT NULL"));

Review Comment:
   I like this behavior a little more because it is deterministic: you subtract 
two constants and you get a constant result. For the other behavior the result 
depends on the current date. 
   
   A third possibility would be to reject this program and require users to 
write casts explicitly.



-- 
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]

Reply via email to