Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15857#discussion_r87932525
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/expressions.scala
 ---
    @@ -428,43 +428,47 @@ object FoldablePropagation extends Rule[LogicalPlan] {
           }
           case _ => Nil
         })
    +    val replaceFoldable: PartialFunction[Expression, Expression] = {
    +      case a: AttributeReference if foldableMap.contains(a) => 
foldableMap(a)
    +    }
     
         if (foldableMap.isEmpty) {
           plan
         } else {
           var stop = false
           CleanupAliases(plan.transformUp {
    -        case u: Union =>
    -          stop = true
    -          u
    -        case c: Command =>
    -          stop = true
    -          c
    -        // For outer join, although its output attributes are derived from 
its children, they are
    -        // actually different attributes: the output of outer join is not 
always picked from its
    -        // children, but can also be null.
    +        // Allow all leafnodes
    --- End diff --
    
    LeafNodes should not stop the folding process. That is what I am trying to 
dat.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to