xudong963 commented on code in PR #2177:
URL: https://github.com/apache/arrow-datafusion/pull/2177#discussion_r846623581


##########
datafusion/core/src/optimizer/simplify_expressions.rs:
##########
@@ -381,6 +381,7 @@ impl<'a> ConstEvaluator<'a> {
             | Expr::QualifiedWildcard { .. } => false,
             Expr::ScalarFunction { fun, .. } => 
Self::volatility_ok(fun.volatility()),
             Expr::ScalarUDF { fun, .. } => 
Self::volatility_ok(fun.signature.volatility),
+            Expr::TableUDF { .. } => false,

Review Comment:
   ditto



##########
datafusion/core/src/datasource/listing/helpers.rs:
##########
@@ -99,6 +99,7 @@ impl ExpressionVisitor for ApplicabilityVisitor<'_> {
             Expr::ScalarUDF { fun, .. } => {
                 self.visit_volatility(fun.signature.volatility)
             }
+            Expr::TableUDF { fun, .. } => 
self.visit_volatility(fun.signature.volatility),

Review Comment:
   I recommend writing it like this:
   ```rust
               Expr::ScalarUDF { fun, .. } | Expr::TableUDF { fun, .. } => {
                   self.visit_volatility(fun.signature.volatility)
               }
   ```



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

Reply via email to