GitHub user yu-iskw opened a pull request:
https://github.com/apache/spark/pull/8266
[SPARK-10075][SparkR] Add `when` expressino function in SparkR
- Add `when` and `otherwise` as `Column` methods
- Add `When` as an expression function
- Add `%otherwise%` infix as an alias of `otherwise`
Since R doesn't support a feature like method chaining, I think
`otherwise(when(condition, value), value)` style is a little annoying for me.
If `%otherwise%` looks strange for @shivaram, I can remove it. What do you
think?
### JIRA
[[SPARK-10075] Add `when` expressino function in SparkR - ASF
JIRA](https://issues.apache.org/jira/browse/SPARK-10075)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/yu-iskw/spark SPARK-10075
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/8266.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 #8266
----
commit f80f7c0ab611896977caa8c4c2b407986b03cb8a
Author: Yu ISHIKAWA <[email protected]>
Date: 2015-08-18T06:43:41Z
[SPARK-10075][SparkR] Add `when` expressino function in SparkR
----
---
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]