Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-5935: [C++] ArrayBuilder::type() should be kept accurate
`ArrayBuilder::type()` should always be identical to the type of the array which would be produced by `ArrayBuilder::Finish()`, even for builders whose type may change. This includes: - adaptive int builders, which may increase the size of integers built - dictionary builders, which may increase the size of their indices - union builders, which may append a new child - nested builders whose children include a builder with mutable type Closes #4930 from bkietz/5935-ArrayBuilders-with-mutable-type-are-not- and squashes the following commits: 7e8730b <Benjamin Kietzman> explicit constructor 61ec25c <Benjamin Kietzman> also revert change to AdaptiveUIntBuilder::Append 4dfb55b <Benjamin Kietzman> revert change to AdaptiveIntBuilder::Append 7c91b0c <Benjamin Kietzman> msvc: explicit cast to int 9d3f17f <Benjamin Kietzman> msvc: explicit cast to int 2d0a776 <Benjamin Kietzman> correct BasicUnionBuilder::type() b1483fa <Benjamin Kietzman> revert modernization of union_ and struct_ 3337566 <Benjamin Kietzman> correct StructBuilder::type() a932317 <Benjamin Kietzman> fix broken union builder::type() method f4e1cc5 <Benjamin Kietzman> fix broken usage of dereferenced type 9022d70 <Benjamin Kietzman> refactor to virtual ArrayBuilder::type() 6d3e703 <Benjamin Kietzman> add assert(type_ != nullptr), test for struct(union) b39ea30 <Benjamin Kietzman> lint: nullptr in headers 4e35165 <Benjamin Kietzman> add explicit parens 08d2c8f <Benjamin Kietzman> remove redundant switch in FinishInternal 721e782 <Benjamin Kietzman> refactor to less frantic type updating 3593b4b <Benjamin Kietzman> iwyu: <utility> 25bc3b5 <Benjamin Kietzman> refactor to keep ArrayBuilder::type_ correct 29e3b73 <Benjamin Kietzman> revert change to ArrayBuilder::Advance() 0707c57 <Benjamin Kietzman> loop with const reference 1a81ce4 <Benjamin Kietzman> builders with mutable type will report this via type_ == nullptr Authored-by: Benjamin Kietzman <bengilgit@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>
- Loading branch information
1 parent
7ef8e05
commit d4e489d
Showing
23 changed files
with
415 additions
and
330 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
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.