Github user dbtsai commented on the issue: https://github.com/apache/spark/pull/21850 @gatorsmile All the new rules added into `If` should always have `CaseWhen` version. But there will be time that we only add `If` version, or it only makes sense to have `If` version. For example, the new rule that short-circuiting the `If` when both branches are the same is not yet in `CaseWhen`. Another rule I am working on is when a conditional expression in `Filter` or `Join`, if any of the output of the branches contains `Literal(null, _)`, it can be replaced by `FalseLiteral`. I only implemented for `If` so far for our use-case.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org