walterddr commented on code in PR #9795:
URL: https://github.com/apache/pinot/pull/9795#discussion_r1021918880
##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/logical/RexExpressionUtils.java:
##########
@@ -54,10 +54,8 @@ static RexExpression handleCast(RexCall rexCall) {
rexCall.getOperands().stream().map(RexExpression::toRexExpression).collect(Collectors.toList());
Preconditions.checkState(operands.size() == 1, "CAST takes exactly 2
arguments");
RelDataType castType = rexCall.getType();
- // add the 2nd argument as the source type info.
- operands.add(new RexExpression.Literal(FieldSpec.DataType.STRING,
-
RexExpression.toPinotDataType(rexCall.getOperands().get(0).getType()).name()));
- return new RexExpression.FunctionCall(rexCall.getKind(),
RexExpression.toDataType(rexCall.getType()), "CAST",
+ operands.add(new RexExpression.Literal(FieldSpec.DataType.STRING,
RexExpression.toPinotDataType(castType).name()));
+ return new RexExpression.FunctionCall(rexCall.getKind(),
RexExpression.toDataType(castType), "CAST",
Review Comment:
this works for so long b/c of the way pinot leaf stage is so forgiving.
(and intermediate stage is following this to some extend b/c of the reuse in
v1 logic)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]