cloud-fan commented on code in PR #49202:
URL: https://github.com/apache/spark/pull/49202#discussion_r1895664708


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala:
##########
@@ -107,6 +107,14 @@ trait PredicateHelper extends AliasHelper with Logging {
     }
   }
 
+  /**
+   * First split the predicates by And, then combine the predicates with the 
same references.

Review Comment:
   I think there is a misunderstanding. What I proposed is 
`splitConjunctivePredicates` should split AND/OR under `With`: `With(c1, c2, c1 
+ c1 > 0 AND c2 + c2 > 0 AND c1 + c2 > 0)` can be split into `With(c1, c1 + c1 
> 0)`, `With(c2, c2 + c2 > 0)`, ` With(c1, c2, c1 + c2 > 0)`. When combine the 
predicates later, we also recognize the `With` and merge them to avoid 
duplicated expressions.



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