zclllyybb commented on code in PR #60111:
URL: https://github.com/apache/doris/pull/60111#discussion_r2724136699


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/expression/rules/FoldConstantRuleOnFE.java:
##########
@@ -218,6 +221,21 @@ public Expression visitLiteral(Literal literal, 
ExpressionRewriteContext context
         return literal;
     }
 
+    @Override
+    public Expression visitGamma(Gamma gamma, ExpressionRewriteContext 
context) {
+        gamma = rewriteChildren(gamma, context);
+        Optional<Expression> checkedExpr = preProcess(gamma);
+        if (checkedExpr.isPresent()) {
+            return checkedExpr.get();
+        }
+        Expression child = gamma.child();
+        if (!(child instanceof Literal)) {
+            return gamma;
+        }
+        double value = ((Literal) child).getDouble();
+        return new 
DoubleLiteral(org.apache.commons.math3.special.Gamma.gamma(value));

Review Comment:
   import then use with function name



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