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

[Rust] PrimitiveArray::new can create arrays not in spec

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 3.0.0
    • Rust

    Description

      Currently, PrimitiveArray::new passed with `null_count != 0` creates an array that does not follow the specification, as it is initialized with a None null bitmap but a non-zero null_count.

      This method also makes no attempt to check for the buffer's aligment, which leads to UB.

      Since a change in this method's signature requires a backward incompatible change, and it is only used in tests, I propose that we just remove it: we have good offers to create primitive arrays:

      • from an ArrayData,
      • from a vector or vector of optionals
      • from an iterator

      which covers all major cases.

      Attachments

        Issue Links

          Activity

            People

              jorgecarleitao Jorge Leitão
              jorgecarleitao Jorge Leitão
              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 - 40m
                  40m