KKcorps commented on code in PR #10562:
URL: https://github.com/apache/pinot/pull/10562#discussion_r1165928304


##########
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ScalarTransformFunctionWrapper.java:
##########
@@ -85,14 +89,45 @@ public void init(List<TransformFunction> arguments, 
Map<String, ColumnContext> c
         "Wrong number of arguments for method: %s, expected: %s, actual: %s", 
_functionInvoker.getMethod(),
         parameterTypes.length, numArguments);
 
-    _arguments = new Object[numArguments];
+    _scalarArguments = new Object[numArguments];
     _nonLiteralIndices = new int[numArguments];
     _nonLiteralFunctions = new TransformFunction[numArguments];
     for (int i = 0; i < numArguments; i++) {
       TransformFunction transformFunction = arguments.get(i);
       if (transformFunction instanceof LiteralTransformFunction) {
-        String literal = ((LiteralTransformFunction) 
transformFunction).getStringLiteral();
-        _arguments[i] = parameterTypes[i].convert(literal, 
PinotDataType.STRING);
+        LiteralTransformFunction literalTransformFunction = 
(LiteralTransformFunction) transformFunction;
+        DataType dataType = 
literalTransformFunction.getResultMetadata().getDataType();

Review Comment:
   Yes +1



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