You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/09/26 07:59:00 UTC

[GitHub] [calcite] clesaec commented on a diff in pull request #2918: [CALCITE-5297] Casting dynamic variable twice throws exception

clesaec commented on code in PR #2918:
URL: https://github.com/apache/calcite/pull/2918#discussion_r979686806


##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -4678,4 +4678,14 @@ void checkCorrelatedMapSubQuery(boolean expand) {
         .withConformance(SqlConformanceEnum.LENIENT)
         .ok();
   }
+
+  /**
+   * Test case for
+   * <a href="https://issues.apache.org/jira/browse/CALCITE-5297">[CALCITE-5297]
+   * Casting dynamic variable twice throws exception</a>.
+   */
+  @Test void testDynamicParameterDoubleCast() {
+    String sql = "SELECT CAST(CAST(? AS INTEGER) AS INTEGER)";

Review Comment:
   [JIRA](https://issues.apache.org/jira/browse/CALCITE-5297) is about Cast Integer, then Char (_CAST(CAST(? AS INTEGER) AS CHAR)_), test is for double CAST to INTEGER. Is it intentional ?



-- 
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-unsubscribe@calcite.apache.org

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