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


##########
core/src/test/java/org/apache/calcite/rel/rel2sql/RelToSqlConverterTest.java:
##########
@@ -4131,6 +4131,22 @@ private SqlDialect nonOrdinalDialect() {
         .withClickHouse().ok(expectedClickHouse);
   }
 
+  /** Test case for
+   * <a 
href="https://issues.apache.org/jira/browse/CALCITE-7067";>[CALCITE-7067]
+   * Maximum precision of unsigned bigint type in MysqlSqlDialect should be 
20</a>. */
+  @Test void testCastToUBigInt() {
+    String query = "select cast(18446744073709551615 as bigint unsigned) from 
\"product\"";
+    final String expectedMysql = "SELECT CAST(18446744073709551615 AS BIGINT 
UNSIGNED)\n"
+        + "FROM `foodmart`.`product`";
+    final String errMsg = "org.apache.calcite.runtime.CalciteContextException: 
"
+        + "From line 1, column 13 to line 1, column 32: "

Review Comment:
   I hope that the error message here only contains the phrase "Numeric literal 
'18446744073709551615' is out of range". This might be another issue that needs 
to be addressed. LGTM NOW.



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