forked from apache/arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-1207: [C++] Implement MapArray, MapBuilder, MapType classes, an…
…d IPC support Implements `MapArray` as a subclass of `ListArray`, where each `value` in the list is a `key: item` pair. (This naming is not the most natural, but `value` is taken.) `MapType::keys_sorted()` is currently stored but unused- for example `MapBuilder` does not check inserted keys for correct ordering. `MapType` is printed as `map<utf8, int32>` and `map<int32, float64, keys_sorted>` for unsorted, sorted keys respectively. Map arrays are created with `ArrayFromJSON` by providing for each pair an array of length 2 containing the key and the mapped item [(example)](https://github.com/apache/arrow/compare/master...bkietz:1207-Implement-Map-logical-type?expand=1#diff-015ed4b6849ed6e64e25bba42aa1d29eR572). Author: Benjamin Kietzman <[email protected]> Closes apache#4352 from bkietz/1207-Implement-Map-logical-type and squashes the following commits: 9fb8700 <Benjamin Kietzman> explicitly disable map in flight test 41b3016 <Benjamin Kietzman> more cleanup, disable JS ipc tests as well 1b74aa1 <Benjamin Kietzman> disable map IPC tests for Java a0de551 <Benjamin Kietzman> cleanup of code which assumes map has 2 children 2aaab29 <Benjamin Kietzman> ListType isa MapType 9b455e7 <Benjamin Kietzman> Add IPC tests for Map 62dade0 <Benjamin Kietzman> remove redundant null check a3be934 <Benjamin Kietzman> add tests using and validating MapBuilder c936ebd <Benjamin Kietzman> fix MapScalar typos 1047a6d <Benjamin Kietzman> run clang-format 31930ff <Benjamin Kietzman> de-inline MapBuilder constructor eb6db03 <Benjamin Kietzman> set keys_, items_ a5c88a1 <Benjamin Kietzman> fix: obj_ is not a pointer 8049c51 <Benjamin Kietzman> MapArray isa ListArray 4c11db9 <Benjamin Kietzman> adding some tests and filling out Map* f89da94 <Benjamin Kietzman> first pass at MapArray, MapBuilder, MapScalar 7fbbe70 <Benjamin Kietzman> add checked_pointer_cast for unique_ptr 5e727e5 <Benjamin Kietzman> add map() type factory e9b34d0 <Benjamin Kietzman> Add keysSorted field 01214fb <Benjamin Kietzman> add MapType and test its ToString 47d95ef <Benjamin Kietzman> add MapType to Layout.rst
- Loading branch information
Showing
34 changed files
with
1,134 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.