yashmayya opened a new pull request, #16992: URL: https://github.com/apache/pinot/pull/16992
- https://github.com/apache/pinot/pull/13573 introduced polymorphism for scalar functions. - However, there are still some paths where the argument count based function retrieval is used instead of argument type based retrieval resulting in non polymorphic behavior. - The primary query execution path that still retains the old behavior is the `ScalarTransformFunctionWrapper`. So, for instance, a query like `SELECT Carrier BETWEEN 'AA' AND 'QQ' FROM mytable` will currently fail. This is because there's no transform function implementation for `BETWEEN` and the scalar wrapper will be used, but without polymorphism the default implementation will be retrieved which expects numeric types and the cast from string types will fail when initializing the wrapper - https://github.com/apache/pinot/blob/ce33d0d918485e3aae6b42ee72c428d02672409e/pinot-common/src/main/java/org/apache/pinot/common/function/scalar/comparison/BetweenScalarFunction.java#L88-L95, https://github.com/apache/pinot/blob/ce33d0d918485e3aae6b42ee72c428d02672409e/pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ScalarTransformFunctionWrapper.java#L83-L153 - This patch fixes the above issue by computing the child transform functions first and then using their result metadata to build the argument data types and use the polymorphic function retrieval method. -- 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]
