-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-18134][SQL] Orderable MapType #19330
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
case map: MapType => | ||
val compareFunc = freshName("compareMap") | ||
val compare = this.addReferenceObj("compare", map.interpretedOrdering, | ||
classOf[Ordering[MapData]].getCanonicalName) |
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.
TODO: we should code generate this.
It seems #15970 is not being worked. |
2e2b98d
to
bd50495
Compare
Test build #82106 has finished for PR 19330 at commit
|
@jinxing64 thanks for taking over. I have glanced over the PR, and I miss the explicit sorting of maps. We can't assume that maps are sorted (or even have unique keys) out of the box, for example the following example should evaluate to |
Test build #82107 has finished for PR 19330 at commit
|
@hvanhovell : based on your comment over the jira, it seemed that the approach to be used is yet to be finalised. Are we moving ahead with this approach ? |
@hvanhovell @tejasapatil |
33e532b
to
0385487
Compare
Test build #82174 has finished for PR 19330 at commit
|
Test build #82173 has finished for PR 19330 at commit
|
Jenkins, retest this plesase. |
0385487
to
5279338
Compare
Test build #82196 has finished for PR 19330 at commit
|
It seems the failed SparkR unit tests is not related. |
Jenkins, retest this please |
Test build #82232 has finished for PR 19330 at commit
|
5279338
to
e071892
Compare
Conflicts resolved. |
Test build #82242 has finished for PR 19330 at commit
|
@jinxing64 While I am not familiar with R, may we have to add one more value for |
keyType: DataType, | ||
valueType: DataType, | ||
valueContainsNull: Boolean, | ||
ordered: Boolean = false) extends DataType { |
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.
Do we need to take care of ordered
in buildFormattedString
and jsonValue
?
Test build #82264 has finished for PR 19330 at commit
|
0b2b52c
to
80b6238
Compare
Test build #82272 has finished for PR 19330 at commit
|
80b6238
to
a9d09f6
Compare
Test build #82282 has finished for PR 19330 at commit
|
@kiszk Thanks again for taking time looking into this :) |
@jinxing64 I would like to hear opinions from other reviewers whether |
5445834
to
a472dae
Compare
Test build #83892 has finished for PR 19330 at commit
|
Test build #83893 has finished for PR 19330 at commit
|
a472dae
to
b1886f6
Compare
Test build #83926 has finished for PR 19330 at commit
|
b1886f6
to
6aa4b8b
Compare
Test build #83929 has finished for PR 19330 at commit
|
Jenkins, retest this please. |
Test build #83936 has finished for PR 19330 at commit
|
Any update? |
@maropu @kiszk |
Aha, I think we can't touch the stable interface ( |
Does the community currently have a join and group by code that supports mapType? |
@xxzzycq |
I think we can resume this pr for v3.0. Are u still there and can you resume this? @jinxing64 |
@maropu |
Thanks! |
Test build #97739 has finished for PR 19330 at commit
|
Test build #97751 has finished for PR 19330 at commit
|
Test build #97767 has finished for PR 19330 at commit
|
Test build #97817 has started for PR 19330 at commit |
What changes were proposed in this pull request?
We can make MapType orderable, and thus usable in aggregates and joins.
Closes #15970
How was this patch tested?
Unit tests.