GitHub user dbtsai opened a pull request:
https://github.com/apache/spark/pull/21850
[SPARK-24892] [SQL] Simplify `CaseWhen` to `If` when there is only one
branch
## What changes were proposed in this pull request?
After the rule of removing the unreachable branches, it could be only one
branch left. In this situation, `CaseWhen` can be converted to `If` to do
further optimization.
## How was this patch tested?
Tests added.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/dbtsai/spark remove-case-when
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21850.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #21850
----
commit 18e2d8da63c05fc931a4b569bd6c404b933eeb0a
Author: DB Tsai <d_tsai@...>
Date: 2018-07-23T18:31:40Z
remove casewhen
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]