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


##########
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:
   It does not matter which types to use. It threw exception in any cases:
   `SELECT CAST(CAST(? AS DATE) AS VARCHAR)`
   `SELECT CAST(CAST(? AS INTEGER) AS CHAR)`
   I just choose  "aesthetically pleasing looking" option



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