walterddr commented on a change in pull request #7485:
URL: https://github.com/apache/pinot/pull/7485#discussion_r717009179



##########
File path: 
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/function/InbuiltFunctionEvaluator.java
##########
@@ -112,22 +113,37 @@ public Object evaluate(Object[] values) {
 
     @Override
     public Object execute(GenericRow row) {
-      int numArguments = _argumentNodes.length;
-      for (int i = 0; i < numArguments; i++) {
-        _arguments[i] = _argumentNodes[i].execute(row);
+      try {
+        int numArguments = _argumentNodes.length;
+        for (int i = 0; i < numArguments; i++) {
+          _arguments[i] = _argumentNodes[i].execute(row);
+        }
+        _functionInvoker.convertTypes(_arguments);
+        return _functionInvoker.invoke(_arguments);
+      } catch (Exception e) {
+        throw new RuntimeException(
+            "Caught exception while executing function: " + this, e);

Review comment:
       ```suggestion
           throw new RuntimeException("Caught exception while executing 
function: " + this, e);
   ```




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