abhioncbr commented on code in PR #10472:
URL: https://github.com/apache/pinot/pull/10472#discussion_r1150743565
##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/operator/operands/FunctionOperand.java:
##########
@@ -52,6 +52,9 @@ public FunctionOperand(RexExpression.FunctionCall
functionCall, DataSchema dataS
_resultName = computeColumnName(functionCall.getFunctionName(),
_childOperandList);
// TODO: Check type match between functionCall's data type and result type.
_resultType =
FunctionUtils.getColumnDataType(_functionInvoker.getResultClass());
+
+ boolean isTypeMatched = functionCall.getDataType() ==
_resultType.toDataType();
+ Preconditions.checkState(isTypeMatched, "Mismatch function data type and
result type");
Review Comment:
Thanks for the help. I have a couple of questions.
- For conversion(`parameterType.convert`), do I have to convert the
`_resultType`(`fieldSpec.DataType`) to PinotDataType and perform the
conversion or use the conversion function`FieldSpec.convertInternal` directly.
- Second, what should be the outcome of the failing `caswhen` query? It
should fail, or with conversion, it should execute without error.
Thanks.
--
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]