[
https://issues.apache.org/jira/browse/SPARK-12770?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15094569#comment-15094569
]
Wenchen Fan commented on SPARK-12770:
-------------------------------------
a limitation for the first rule: we can only use that branch if it's true and
is the FIRST branch.
> Implement rules for branch elimination for CaseWhen in SimplifyConditionals
> ---------------------------------------------------------------------------
>
> Key: SPARK-12770
> URL: https://issues.apache.org/jira/browse/SPARK-12770
> Project: Spark
> Issue Type: Sub-task
> Components: Optimizer, SQL
> Reporter: Reynold Xin
>
> There are a few things we can do:
> 1. If a branch's condition is a true literal, remove the CaseWhen and use the
> value from that branch.
> 2. If a branch's condition is a false or null literal, remove that branch.
> 3. If only the else branch is left, remove the CaseWhen and use the value
> from the else branch.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]