danny0405 commented on a change in pull request #1327: [CALCITE-3206] Better
error message when param type incompatibility (…
URL: https://github.com/apache/calcite/pull/1327#discussion_r306102778
##########
File path:
core/src/main/java/org/apache/calcite/sql2rel/StandardConvertletTable.java
##########
@@ -795,6 +796,13 @@ private RexNode convertCall(
for (RexNode expr : oldExprs) {
exprs.add(cx.getRexBuilder().ensureType(type, expr, true));
}
+ } else if (!SqlTypeUtil.areSameFamily(RexUtil.types(exprs))
+ && consistency != SqlOperandTypeChecker.Consistency.NONE) {
Review comment:
Sorry, i don't think we should make any decision and throw assertion error
like this, the StandardConvertletTable.java did some work for the function
call's operands type consistency, but it does not guarantee this, and it only
touch the standard operator table, how about the UDF/UDAF ?
Also calcite allows some comparable types to be compared directly, like a
.string and numeric, so please do not make the change to these tests, this
destroy the semantics.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services