asolimando commented on code in PR #3687:
URL: https://github.com/apache/calcite/pull/3687#discussion_r1504751569


##########
core/src/main/java/org/apache/calcite/adapter/enumerable/RexToLixTranslator.java:
##########
@@ -1374,11 +1374,35 @@ private Result toInnerStorageType(Result result, Type 
storageType) {
     }
     final Type storageType = currentStorageType != null
         ? currentStorageType : 
typeFactory.getJavaClass(dynamicParam.getType());
-    final Expression valueExpression =
+
+    // For numeric types, get the value using the following functions on the

Review Comment:
   > I made the requested change, but kept the null check as the cast operation 
may fail. For instance, `o.intValue()` requires `o` to be non-null. Otherwise, 
`testPreparedStatement` would fail.
   
   I might have made a mistake but I tried all your tests with the suggested 
piece of code and all passed.
   Did you add a new test specifically for this maybe?



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