-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-1279: [Integration] Enable MapType integration tests #4684
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
ARROW-1279: [Integration] Enable MapType integration tests #4684
Conversation
cpp/src/arrow/type.cc
Outdated
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 the name that Java has hardcoded as a final variable in the ListVector. It can be changed though, but both sides have to agree or the schema equality test fails if it is different.
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.
How about "entries"?
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, that sounds much better to me
cpp/src/arrow/type.cc
Outdated
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.
How about "entries"?
cpp/src/arrow/type.cc
Outdated
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.
Can we call this "value" instead of "item"?
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.
sure
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.
@wesm The reason for "item" is that "value" is already used in the scope of ListArray; it refers to what will now be called entries. So after the renaming above map_array.values() returns the entries and map_array.items() returns the values. If we override map_array.values() to do the thing everyone will expect, then it's no longer safe to treat ListArrays as MapArrays. Honestly what I'd prefer is to also rename ListArray::values to ListArray::entries or items so we can maintain sane naming
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 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.
Added a JIRA to track this for later https://issues.apache.org/jira/browse/ARROW-5745
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.
@bkietz so is the naming here ok to be merged for now and then we can finalize it in ARROW-5745 as a followup?
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.
@BryanCutler I think so, 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.
cc @pravindra on the name change for MapVector struct field from "$data$" to "entries"
|
Seems like For me locally |
|
@BryanCutler Did you compile in debug mode? This may be a debug-only check. |
|
I built in release, let me try debug |
|
Yup that was it @pitrou , I can reproduce it now, thanks! |
d8e2342 to
f1545d3
Compare
|
I rebased, to hopefully get the MacOS tests passing |
wesm
left a comment
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.
+1, pending CI
9f985a9 to
b74435f
Compare
b74435f to
6259a45
Compare
|
merging |
This PR enables MapType integration tests for C++ and Java, and fixes remaining issues to pass. Previously, C++ created a MapType with a StructType field that is nullable, which is required to be non-nullable from the spec. The struct field has the name "entries" and the struct data pairs are named "key" and "value." Author: Bryan Cutler <cutlerb@gmail.com> Closes apache#4684 from BryanCutler/map-type-integration-tests-ARROW-1279 and squashes the following commits: 6259a45 <Bryan Cutler> rename MapType fields for internal test 3077780 <Bryan Cutler> rename MapType struct field to 'entries' 3185af9 <Bryan Cutler> Fix MapType to create a non-nullable struct field
This PR enables MapType integration tests for C++ and Java, and fixes remaining issues to pass. Previously, C++ created a MapType with a StructType field that is nullable, which is required to be non-nullable from the spec. The struct field has the name "entries" and the struct data pairs are named "key" and "value." Author: Bryan Cutler <cutlerb@gmail.com> Closes apache#4684 from BryanCutler/map-type-integration-tests-ARROW-1279 and squashes the following commits: 6259a45 <Bryan Cutler> rename MapType fields for internal test 3077780 <Bryan Cutler> rename MapType struct field to 'entries' 3185af9 <Bryan Cutler> Fix MapType to create a non-nullable struct field
This PR enables MapType integration tests for C++ and Java, and fixes remaining issues to pass. Previously, C++ created a MapType with a StructType field that is nullable, which is required to be non-nullable from the spec. The struct field has the name "entries" and the struct data pairs are named "key" and "value."