julianhyde commented on code in PR #3677: URL: https://github.com/apache/calcite/pull/3677#discussion_r1498349778
########## core/src/main/java/org/apache/calcite/adapter/enumerable/RexImpTable.java: ########## @@ -3262,11 +3262,21 @@ private static class CastImplementor extends AbstractRexCallImplementor { @Override Expression implementSafe(final RexToLixTranslator translator, final RexCall call, final List<Expression> argValueList) { - assert call.getOperands().size() == 1; + assert call.getOperands().size() <= 2; final RelDataType sourceType = call.getOperands().get(0).getType(); - // Short-circuit if no cast is required RexNode arg = call.getOperands().get(0); + ConstantExpression formatExpr; + if (call.getOperands().size() > 1) { Review Comment: `SqlCall` has `<S extends SqlNode> S operand(int)` and `int operandCount()`. I think we should follow that model. -- 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