-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-20375][R] R wrappers for array and map #17674
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -942,6 +942,14 @@ setGeneric("countDistinct", function(x, ...) { standardGeneric("countDistinct") | |
| #' @export | ||
| setGeneric("crc32", function(x) { standardGeneric("crc32") }) | ||
|
|
||
| #' @rdname create_array | ||
|
||
| #' @export | ||
| setGeneric("create_array", function(x, ...) { standardGeneric("create_array") }) | ||
|
|
||
| #' @rdname create_map | ||
| #' @export | ||
| setGeneric("create_map", function(x, ...) { standardGeneric("create_map") }) | ||
|
|
||
| #' @rdname hash | ||
| #' @export | ||
| setGeneric("hash", function(x, ...) { standardGeneric("hash") }) | ||
|
|
||
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.
nullin JVM is mapped to NA in R - we haven't documented that consistently, but would be good to start thinking about the better way to do thatThere 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 think it is clear from the context that we mean SQL
NULLand bothlit(NA)andlit(NULL)create SQLNULLliteral. But this reminds me of something else:doesn't look right. PySpark handles this correctly
with
DoubleType.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 wouldn't be surprised that we have some issues with
NaN...but does it work if you add it to an existing dataframe instead of going via
createDataFrame? there's some additional type inference going on in the 2nd route.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.
It doesn't work with
createDataFrameeither.For
litit should be a quick fix because we can call JavalitwithFloat.NaN.createDataFramewon't be that simple.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.
actually
but does it work if you add it to an existing dataframe instead of going via createDataFrame? there's some additional type inference going on in the 2nd route.I mean like
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.
No, it doesn't.
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.
ok, let's open a JIRA on that separately..
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.
My thoughts exactly.