agavra opened a new pull request, #9927:
URL: https://github.com/apache/pinot/pull/9927
Fixes #8409 - if you issue a query with a function that does not match the
expected signature you will get the following error message as response:
```
[
{
"errorCode": 200,
"message": "QueryExecutionError:\njava.lang.IllegalArgumentException:
Function sum does not support input types: [STRING]\n\tat
org.apache.pinot.core.query.utils.ExpressionTypeResolver.visitFunction(ExpressionTypeResolver.java:113)\n\tat
org.apache.pinot.core.query.utils.ExpressionTypeResolver.visitFunction(ExpressionTypeResolver.java:47)\n\tat
org.apache.pinot.common.request.context.ExpressionContext.visit(ExpressionContext.java:114)\n\tat
org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.lambda$makeSegmentPlanNode$0(InstancePlanMakerImplV2.java:241)"
}
]
```
This PR works by introducing a visitor that traverses an Expression Context
graph and resolves all input/output types recursively to make sure that
aggregate functions can be properly resolved.
**NOTE:** this does not verify the validity of scalar or transform functions.
--
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]