-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-9871][SparkR] Add expression functions into SparkR which have a variable parameter #8194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…a variable parameter
|
Test build #40858 has finished for PR 8194 at commit
|
|
@shivaram could you review it? |
R/pkg/R/functions.R
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason this is a S3 function unlike the others in this class ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we define a S4 function which has argument signitures which are like Any? As far as I know, setMethod requires signatures of argument objects.
The argument of lit in Scala is Any. Otherwise, we should define multiple S4 function as follows.
setMethod("lit", signature("numeric"), .....)
setMethod("lit", signature("character"), .....)
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know we can use ANY as a signature.
"There are two special classes that can be used in the signature: missing and ANY. missing matches the case where the argument is not supplied, and ANY is used for setting up default methods."
http://adv-r.had.co.nz/S4.html
|
Thanks @yu-iskw. I left some comments inline. One more thing we need to do is to update our [1] https://github.com/apache/spark/blob/master/R/pkg/NAMESPACE |
|
Test build #40938 has finished for PR 8194 at commit
|
|
Test build #40939 has finished for PR 8194 at commit
|
|
Test build #41002 has finished for PR 8194 at commit
|
|
@shivaram could you review it?
I have a question about |
R/pkg/NAMESPACE
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lit needs to be added to this list
|
Thanks @yu-iskw - I had a minor comment about the |
|
@shivaram thank you for your comment. I updated it! |
|
Test build #41006 has finished for PR 8194 at commit
|
|
LGTM Merging this |
… a variable parameter ### Summary - Add `lit` function - Add `concat`, `greatest`, `least` functions I think we need to improve `collect` function in order to implement `struct` function. Since `collect` doesn't work with arguments which includes a nested `list` variable. It seems that a list against `struct` still has `jobj` classes. So it would be better to solve this problem on another issue. ### JIRA [[SPARK-9871] Add expression functions into SparkR which have a variable parameter - ASF JIRA](https://issues.apache.org/jira/browse/SPARK-9871) Author: Yu ISHIKAWA <[email protected]> Closes #8194 from yu-iskw/SPARK-9856. (cherry picked from commit 26e7605) Signed-off-by: Shivaram Venkataraman <[email protected]>
|
Thank you for merging it! |
… a variable parameter ### Summary - Add `lit` function - Add `concat`, `greatest`, `least` functions I think we need to improve `collect` function in order to implement `struct` function. Since `collect` doesn't work with arguments which includes a nested `list` variable. It seems that a list against `struct` still has `jobj` classes. So it would be better to solve this problem on another issue. ### JIRA [[SPARK-9871] Add expression functions into SparkR which have a variable parameter - ASF JIRA](https://issues.apache.org/jira/browse/SPARK-9871) Author: Yu ISHIKAWA <[email protected]> Closes apache#8194 from yu-iskw/SPARK-9856.
Summary
litfunctionconcat,greatest,leastfunctionsI think we need to improve
collectfunction in order to implementstructfunction. Sincecollectdoesn't work with arguments which includes a nestedlistvariable. It seems that a list againststructstill hasjobjclasses. So it would be better to solve this problem on another issue.JIRA
[SPARK-9871] Add expression functions into SparkR which have a variable parameter - ASF JIRA