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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to