Skip to content
Snippets Groups Projects
  • Yu ISHIKAWA's avatar
    bf32c1f7
    [SPARK-10075] [SPARKR] Add `when` expressino function in SparkR · bf32c1f7
    Yu ISHIKAWA authored
    - 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, `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)
    
    Author: Yu ISHIKAWA <yuu.ishikawa@gmail.com>
    
    Closes #8266 from yu-iskw/SPARK-10075.
    bf32c1f7
    History
    [SPARK-10075] [SPARKR] Add `when` expressino function in SparkR
    Yu ISHIKAWA authored
    - 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, `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)
    
    Author: Yu ISHIKAWA <yuu.ishikawa@gmail.com>
    
    Closes #8266 from yu-iskw/SPARK-10075.