-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25817][SQL] Dataset encoder should support combination of map and product type #22812
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
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.
these are unrelated, but is a followup of #16986 to address the remaining code style comments.
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.
this is to address #22745 (comment)
|
Test build #97959 has finished for PR 22812 at commit
|
|
retest this please |
|
Test build #97965 has finished for PR 22812 at commit
|
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.
unrelated but to fix minor code style issues in #22749
|
Test build #98019 has finished for PR 22812 at commit
|
|
retest this please |
|
Test build #98020 has finished for PR 22812 at commit
|
|
Test build #98026 has finished for PR 22812 at commit
|
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.
Thanks!
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.
When u.child is resolved, is there still UnresolvedExtractValue?
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.
Yea I think so. The UnresolvedExtractValue might appear in CatalystToExternalMap.keyLambdaFunction and valueLambdaFunction
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.
ResolveReferences might also process that, but it is also good to have them here.
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.
TBH I don't quite remember why I did this for MapObjects, so I just follow it here. Maybe we can remove it in a followup PR.
|
LGTM |
|
Test build #98062 has finished for PR 22812 at commit
|
|
retest this please |
|
Test build #98147 has finished for PR 22812 at commit
|
|
thanks, merging to master! |
…and product type ## What changes were proposed in this pull request? After apache#22745 , Dataset encoder supports the combination of java bean and map type. This PR is to fix the Scala side. The reason why it didn't work before is, `CatalystToExternalMap` tries to get the data type of the input map expression, while it can be unresolved and its data type is known. To fix it, we can follow `UnresolvedMapObjects`, to create a `UnresolvedCatalystToExternalMap`, and only create `CatalystToExternalMap` when the input map expression is resolved and the data type is known. ## How was this patch tested? enable a old test case Closes apache#22812 from cloud-fan/map. Authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
After #22745 , Dataset encoder supports the combination of java bean and map type. This PR is to fix the Scala side.
The reason why it didn't work before is,
CatalystToExternalMaptries to get the data type of the input map expression, while it can be unresolved and its data type is known. To fix it, we can followUnresolvedMapObjects, to create aUnresolvedCatalystToExternalMap, and only createCatalystToExternalMapwhen the input map expression is resolved and the data type is known.How was this patch tested?
enable a old test case