-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[SPARK-8807][SparkR] Add between operator in SparkR #7356
Conversation
Test build #37091 has finished for PR 7356 at commit
|
@sun-rui could you also take a look at this ? |
#' @param bounds lower and upper bounds | ||
setMethod("between", signature(x = "Column"), | ||
function(x, bounds) { | ||
if (is.vector(bounds) && length(bounds) == 2) { |
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.
Would we also need to check the types of bound
here ? Or to put it another way, does this work for all types or just numbers ?
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.
Because in Column.scala
, the types of lowerBound
and upperBound
in between
function are Any
, so I have not checked the types of bound
here too.
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.
@shivaram Any more comments?
Test build #37463 has finished for PR 7356 at commit
|
Thanks @viirya -- LGTM. |
column_functions3 <- c("between") createColumnFunction3 <- function(name) { |
@sun-rui I use the API described in the JIRA ticket. Actually I used two parameters for the lower bound and upper bounds at the first. I am not sure if the between operation supports complex types? I think it is possibly to have |
Hmm I think the scala API having two arguments makes an interesting case -- I did not notice that. What does the Python API do ? One thing about the |
JIRA: https://issues.apache.org/jira/browse/SPARK-8807
Add between operator in SparkR.