richardstartin commented on a change in pull request #7443:
URL: https://github.com/apache/pinot/pull/7443#discussion_r711205991



##########
File path: 
pinot-core/src/main/java/org/apache/pinot/core/operator/transform/function/ScalarTransformFunctionWrapper.java
##########
@@ -113,6 +114,12 @@ public void init(List<TransformFunction> arguments, 
Map<String, DataSource> data
       }
     }
     _nonLiteralValues = new Object[_numNonLiteralArguments][];
+
+    // if FunctionInvoker contains an instance function. initialize it.
+    Object instance = _functionInvoker.getInstance();
+    if (instance != null && instance instanceof InitializableScalarFunction) {

Review comment:
       `instance instanceof InitializableScalarFunction` will fail (i.e. yield 
false) if the instance is null, so the null check is superfluous.




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