-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Currently, Pinot's FunctionRegistry registers and looks up function based on name and function argument count. this causes a problem that we can't register 2 functions with the same name but different function argument types. for example sum(int, int) and sum(long, long)
Propose to change a FunctionRegistry to accept lookup based on argument type.
Map<String, Map<Integer, FunctionInfo>> FUNCTION_INFO_MAP;will be changed to be of type:Map<String, Map<Collection<DataType>, FunctionInfo>>.- Lookup will now support both argument count and argument type list.
- Lookup should also support same argument signature, but different return type, for example:
CAST(intCol AS 'long')andCAST(intCol AS 'double')will have identical arg signaturecast(int, string)but different return type. see: [bug] CAST after expression causes weird exception #8424
Note: this depends on LiteralContext in #8596 as there's a backward incompatible Literal argument type issue, however to some extent we can ignore this limitation by always returning the first matching argument count function
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels