NobiGo commented on code in PR #4066:
URL: https://github.com/apache/calcite/pull/4066#discussion_r1861400506


##########
testkit/src/main/java/org/apache/calcite/test/SqlOperatorTest.java:
##########
@@ -3297,6 +3297,28 @@ static void checkOverlaps(OverlapChecker c) {
         DECIMAL_OVERFLOW, true);
   }
 
+  /** Test case for <a 
href="https://issues.apache.org/jira/browse/CALCITE-6706";>[CALCITE-6706]
+   * Checked arithmetic does not take effect in subqueries</a>. */
+  @Test void testCastOverflow() {
+    final SqlOperatorFixture f = 
fixture().withConformance(SqlConformanceEnum.BIG_QUERY);
+    f.checkFails("SELECT -CAST(-32768 AS SMALLINT)",
+        ".*Value 32768 does not fit in a SMALLINT", true);

Review Comment:
   `.*` is necessary for this test?



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