Skip to content

Commit 0bddf5d

Browse files
authored
GH-49415: [C++] Don't change map type key/item/value field names (#49416)
### Rationale for this change The current implementation forces using `key`/`value`/`entries` as key/item/value field names and ignores field names in FlatBuffers. ### What changes are included in this PR? Use field names in FlatBuffers. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. **This PR includes breaking changes to public APIs.** If an application depends on `key`/`value`/entries` as map type's field names, an application may not work when incoming Apache Arrow data doesn't use `key`/`value`/`entries` as map type's field names. * GitHub Issue: #49415 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 96ecb13 commit 0bddf5d

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

cpp/src/arrow/ipc/metadata_internal.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,7 @@ Status ConcreteTypeFromFlatbuffer(flatbuf::Type type, const void* type_data,
390390
return Status::Invalid("Map's keys must be non-nullable");
391391
} else {
392392
auto map = static_cast<const flatbuf::Map*>(type_data);
393-
*out = std::make_shared<MapType>(children[0]->type()->field(0)->WithName("key"),
394-
children[0]->type()->field(1)->WithName("value"),
395-
map->keysSorted());
393+
*out = std::make_shared<MapType>(children[0], map->keysSorted());
396394
}
397395
return Status::OK();
398396
case flatbuf::Type::Type_FixedSizeList:

0 commit comments

Comments
 (0)