-
Notifications
You must be signed in to change notification settings - Fork 28k
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-10050][SPARKR] Support collecting data of MapType in DataFrame. #8711
Conversation
sun-rui
commented
Sep 11, 2015
- Support collecting data of MapType from DataFrame.
- Support data of MapType in createDataFrame.
Test build #42309 has finished for PR 8711 at commit
|
Test build #42310 has finished for PR 8711 at commit
|
Jenkins, retest this please |
Test build #42335 has finished for PR 8711 at commit
|
what's wrong with Jenkins? This PR does not add any public class. |
as it says the public classes bit is experimental (it gets it wrong sometimes). |
@holdenk, thanks! |
Jenkins, retest this please |
good luck this time? |
if (length(matchedStrings[[1]]) >= 3) { | ||
keyType <- matchedStrings[[1]][2] | ||
valueType <- matchedStrings[[1]][3] | ||
checkType(keyType) |
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'm curious, on the write side the keyType has to be strings, but on the read side (collect) that restriction doesn't have to exist. Is this a missing check read side or I am just being overly cautious.
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.
yeah, good catch. Should check if the key type is String. Also need to add check on Scala side.
It seems a little boring that doing type check on both R and Scala side. Maybe we can remove the type check on R side. Not sure for now.
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.
cool :)
Test build #42415 has finished for PR 8711 at commit
|
Test build #42417 has finished for PR 8711 at commit
|
Jenkins, retest this please |
keyType = "string", | ||
valueType = infer_type(get(key, x)), | ||
valueContainsNull = TRUE) | ||
paste0("map<string,", infer_type(get(key, x)), ">") |
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.
One minor thing -- in the previous list we had an entry for valueContainsNull
that we dont have any more. I can see that this was always TRUE
so this probably doesn't affect functionality right now, but I am just wondering if we had it for some other purpose
cc @daveis
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.
There is no way to infer it is nullable or not. So it is always TRUE. Removing it does not affect functionality.
Test build #42462 has finished for PR 8711 at commit
|
Test build #42468 has finished for PR 8711 at commit
|
Test build #42477 has finished for PR 8711 at commit
|
LGTM |
@davies let me know if you have any comments or I'll merge this later today |
LGTM |