yashmayya commented on code in PR #16992:
URL: https://github.com/apache/pinot/pull/16992#discussion_r2418247472


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/TransformFunctionFactory.java:
##########
@@ -336,7 +344,14 @@ public static TransformFunction get(ExpressionContext 
expression, Map<String, Co
         } else {
           // Scalar function
           String canonicalName = FunctionRegistry.canonicalize(functionName);
-          FunctionInfo functionInfo = 
FunctionRegistry.lookupFunctionInfo(canonicalName, numArguments);
+          // Get data types for the arguments
+          DataSchema.ColumnDataType[] argumentDataTypes = new 
DataSchema.ColumnDataType[numArguments];
+          for (int i = 0; i < numArguments; i++) {
+            argumentDataTypes[i] = DataSchema.ColumnDataType.fromDataType(
+                
transformFunctionArguments.get(i).getResultMetadata().getDataType(),
+                
transformFunctionArguments.get(i).getResultMetadata().isSingleValue());
+          }
+          FunctionInfo functionInfo = 
FunctionRegistry.lookupFunctionInfo(canonicalName, argumentDataTypes);

Review Comment:
   Or they can return `null` if the types aren't supported at all, in which 
case `FunctionRegistry.lookupFunctionInfo` also returns `null` and the caller 
handles it as appropriate (basically no match found for function signature).



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