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


##########
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:
   Yes, that makes sense. I added a similar test based on Mihai's request 
below. Since this PR is mostly about numeric types, `VARCHAR` conversions could 
be tackled in a separate ticket.
   
   Indeed. All the tests I added were passing with your change, but 
`testPreparedStatement` existed before and started failing. Explicitly checking 
whether the value is `null`, fixed it.



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