walterddr commented on code in PR #9600:
URL: https://github.com/apache/pinot/pull/9600#discussion_r997134274


##########
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java:
##########
@@ -106,12 +156,16 @@ public static void registerFunction(Method method, 
boolean nullableParameters) {
   /**
    * Registers a method with the given function name.
    */
-  public static void registerFunction(String functionName, Method method, 
boolean nullableParameters) {
-    FunctionInfo functionInfo = new FunctionInfo(method, 
method.getDeclaringClass(), nullableParameters);
+  public static void registerFunction(String functionName, Method method, 
boolean nullableParameters, boolean narrowing,

Review Comment:
   qq: how do we plan to generate a signature for calcite? 
   - for example if a function accepts narrowing, i am not 100% sure how to 
tell calcite's catalog reader that a function accepts multiple parameter type 
(let a long the cartesian combination of all possible variations)
   - it looks like we might need to use direct override of the planner function 
matching algorithm ?



##########
pinot-common/src/main/java/org/apache/pinot/common/function/FunctionRegistry.java:
##########
@@ -49,11 +54,53 @@ private FunctionRegistry() {
 
   // TODO: consolidate the following 2
   // This FUNCTION_INFO_MAP is used by Pinot server to look up function by # 
of arguments
-  private static final Map<String, Map<Integer, FunctionInfo>> 
FUNCTION_INFO_MAP = new HashMap<>();
+  private static final Map<String, Map<List<Class<?>>, FunctionInfo>> 
FUNCTION_INFO_MAP = new HashMap<>();
   // This FUNCTION_MAP is used by Calcite function catalog tolook up function 
by function signature.
   private static final NameMultimap<Function> FUNCTION_MAP = new 
NameMultimap<>();
 
+  // checks casts between primitives

Review Comment:
   pretty sure there's some library out there that does this in jvm. can we 
check if we can leverage some existing solution?



-- 
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]

Reply via email to