GitHub user hvanhovell opened a pull request:
https://github.com/apache/spark/pull/15322
[SPARK-17753][SQL] Allow a complex expression as the input a value based
case statement
## What changes were proposed in this pull request?
We currently only allow relatively simple expressions as the input for a
value based case statement. Expressions like `case (a > 1) or (b = 2) when true
then 1 when false then 0 end` currently fail. This PR adds support for such
expressions.
## How was this patch tested?
Added a test to the ExpressionParserSuite.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hvanhovell/spark SPARK-17753
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15322.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 #15322
----
commit b25c84949edf5cf224e8ca93c18734805760dc11
Author: Herman van Hovell <[email protected]>
Date: 2016-10-02T01:02:56Z
Allow a complex expression as the input a value based case statement
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]