Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-5935

[C++] ArrayBuilders with mutable type are not robustly supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.15.0
    • C++

    Description

      (Dense|Sparse)UnionBuilder, DictionaryBuilder, Addaptive(U)IntBuilders and any nested builder which contains one of those may Finish to an array whose type disagrees with what was passed to MakeBuilder. This is not well documented or supported; ListBuilder checks if its child has changed type but StructBuilder does not. Furthermore ListBuilder's check does not catch modifications to a DictionaryBuidler's type and results in an invalid array on Finish: https://github.com/apache/arrow/blob/1bcfbe1/cpp/src/arrow/array-dict-test.cc#L951-L994

      Let's add to the ArrayBuilder contract: the type property is null iff that builder's type is indeterminate until Finish() is called. Then all nested builders can check this on their children at construction and bubble type mutability correclty

      Attachments

        Issue Links

          Activity

            People

              bkietz Ben Kietzman
              bkietz Ben Kietzman
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 8h 50m
                  8h 50m