Vamsi-klu commented on PR #18627:
URL: https://github.com/apache/pinot/pull/18627#issuecomment-4966078076
The root cause here is in `registerTransformFunctions` in
`PinotOperatorTable`, which only registers a `TransformFunctionType` when
`getReturnTypeInference()` is non-null, so the old `LOOKUP("lookUp")` (both
return type and operand checker null) never made it into the operator table and
Calcite had nothing to match against. Giving it `ReturnTypes.explicit(ANY)`
plus `variadic(from(4))` lines up with what `LookupTransformFunction.init`
enforces (`arguments.size() >= 4`), and it reuses the same `variadic` pattern
`VALUE_IN` already uses in that enum, so this reads correct to me. `ANY` is the
sensible call since the return type is whatever dim column you look up. Only
thing I wondered is whether it's worth enforcing the even argument count
(`arguments.size() % 2 == 0`) at plan time too, but that's a nit and the
runtime already guards it.
--
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]