maropu commented on a change in pull request #24118: [SPARK-26736][SQL] if filter condition has rand() function it does not do partition prunning URL: https://github.com/apache/spark/pull/24118#discussion_r266292141
########## File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/planning/patterns.scala ########## @@ -63,7 +63,7 @@ object PhysicalOperation extends PredicateHelper { val substitutedFields = fields.map(substitute(aliases)).asInstanceOf[Seq[NamedExpression]] (Some(substitutedFields), filters, other, collectAliases(substitutedFields)) - case Filter(condition, child) if condition.deterministic => + case Filter(condition, child) if condition.deterministic || condition.isInstanceOf[And] => Review comment: I think this pattern should not return non-determinisitc exprs, but this current change does so, right? Can we modify code to extract deterministic exprs in line 67-69? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org