Jackie-Jiang commented on code in PR #13673:
URL: https://github.com/apache/pinot/pull/13673#discussion_r1725785435


##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/rewriter/CompileTimeFunctionsInvoker.java:
##########
@@ -61,38 +64,40 @@ protected static Expression 
invokeCompileTimeFunctionExpression(@Nullable Expres
     List<Expression> operands = function.getOperands();
     int numOperands = operands.size();
     boolean compilable = true;
+    ColumnDataType[] argumentTypes = new ColumnDataType[numOperands];
+    Object[] arguments = new Object[numOperands];
     for (int i = 0; i < numOperands; i++) {
       Expression operand = 
invokeCompileTimeFunctionExpression(operands.get(i));
-      if (operand.getLiteral() == null) {
+      operands.set(i, operand);
+      Literal literal = operand.getLiteral();
+      if (compilable && literal != null) {
+        RequestUtils.getLiteralTypeAndValue(literal, argumentTypes, arguments, 
i);

Review Comment:
   I initially did that, then trying to safe a `Object` by passing in the 
arrays (also explains the unused import :P). I guess it might be over 
optimization. Changing it back to using pair to be more readable



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