Anthrino commented on code in PR #3677: URL: https://github.com/apache/calcite/pull/3677#discussion_r1498141654
########## 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: Makes sense, yes the options should only be 1 or 2 for now, if we have a `AT <Timezone>` clause added in later it would become 3, but irrespective we should make it a deterministic equality check. -- 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