xiangfu0 commented on code in PR #19247:
URL: https://github.com/apache/pinot/pull/19247#discussion_r3841362966


##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/rewriter/CompileTimeFunctionsInvoker.java:
##########
@@ -72,9 +72,8 @@ public static Expression 
invokeCompileTimeFunctionExpression(@Nullable Expressio
     for (int i = 0; i < numOperands; i++) {
       Expression operand = 
invokeCompileTimeFunctionExpression(operands.get(i));
       operands.set(i, operand);
-      Literal literal = operand.getLiteral();
-      if (compilable && literal != null) {
-        Pair<ColumnDataType, Object> typeAndValue = 
RequestUtils.getLiteralTypeAndValue(literal);
+      Pair<ColumnDataType, Object> typeAndValue = getCompileTimeValue(operand);

Review Comment:
   Restored the compilable guard before extracting operand values. Child 
expressions are still visited intentionally so independent deterministic 
children can be folded even when the parent is not compilable.



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