tindzk commented on code in PR #3687:
URL: https://github.com/apache/calcite/pull/3687#discussion_r1489933074
##########
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:
Indeed. The PR only fixes the issue for numeric values, but for other types
the user would still encounter a `ClassCastException`. Ideally, we would have a
function that handles all implicit conversions and fails with a user-friendly
error for unsupported conversions. I am sure this functionality already exists
in the Calcite in the form of `CAST` expressions. Possibly it could be
leveraged here.
--
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]