-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Describe the bug, including details regarding any error messages, version, and platform.
I'm preparing an integration test for pure Ruby Apache Arrow reader/writer and found this.
In our integration test, we have an integration test that uses some_key/some_item/some_entries as key/item/value field names:
arrow/dev/archery/archery/integration/datagen.py
Lines 1730 to 1733 in 007903c
| MapField('map_other_names', | |
| get_field('some_key', 'utf8', nullable=False), | |
| get_field('some_value', 'int32'), | |
| entries_name='some_entries'), |
The C++ implementation rewrites key/item/value field names as key/value/entries:
arrow/cpp/src/arrow/ipc/metadata_internal.cc
Lines 393 to 394 in 007903c
| *out = std::make_shared<MapType>(children[0]->type()->field(0)->WithName("key"), | |
| children[0]->type()->field(1)->WithName("value"), |
Lines 1042 to 1043 in 007903c
| ::arrow::field("entries", | |
| struct_({std::move(key_field), std::move(item_field)}), false), |
So the expected value represented in JSON uses some_key/some_item/some_entries but the generated Apache Arrow data by the C++ implementation uses key/item/entries.
FYI: The above WithName() code was added by #35297.
Component(s)
C++