YiwenWu commented on code in PR #3708:
URL: https://github.com/apache/calcite/pull/3708#discussion_r1509906302


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -1329,8 +1329,14 @@ void testCastStringToDateTime(CastType castType, 
SqlOperatorFixture f) {
       f.checkNull("cast('notdate' as DATE)");
     }
 
-    f.checkScalar("cast('52534253' as DATE)", "7368-10-13", "DATE NOT NULL");
-    f.checkScalar("cast('1945-30-24' as DATE)", "1947-06-26", "DATE NOT NULL");
+    // Remove the if condition and the else block once CALCITE-6248 is fixed 
in Avatica
+    if (TestUtil.AVATICA_VERSION.startsWith("1.0.0-dev-main")) {
+      f.checkFails("cast('52534253' as DATE)", BAD_DATETIME_MESSAGE, true);

Review Comment:
   There is a unit test failed



##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -1320,7 +1320,7 @@ void testCastStringToDateTime(CastType castType, 
SqlOperatorFixture f) {
     f.checkCastToString("DATE '1945-2-24'", null, "1945-02-24", castType);
 
     f.checkScalar("cast('1945-02-24' as DATE)", "1945-02-24", "DATE NOT NULL");
-    f.checkScalar("cast(' 1945-02-04 ' as DATE)", "1945-02-04", "DATE NOT 
NULL");

Review Comment:
   Is it possible to add new unit tests instead of changing existing test cases?



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to