You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Benjamin Kietzman (JIRA)" <ji...@apache.org> on 2018/11/14 21:45:00 UTC

[jira] [Created] (ARROW-3793) TestScalarAppendUnsafe is not testing unsafe appends

Benjamin Kietzman created ARROW-3793:
----------------------------------------

             Summary: TestScalarAppendUnsafe is not testing unsafe appends
                 Key: ARROW-3793
                 URL: https://issues.apache.org/jira/browse/ARROW-3793
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.12.0
            Reporter: Benjamin Kietzman


In [TestScalarAppendUnsafe|https://github.com/apache/arrow/blob/56e72ba09c3d886c6a5aeb11fb1642af13819f93/cpp/src/arrow/array-test.cc#L1497], AppendNull is called to modify the bitmask which is not unsafe- it reserves at least one more element. UnsafeAppendNull should be used instead.

Since PoolBuffers round their capacities up to multiples of 64 bytes, no buffer is ever in danger of overflowing in this test anyway. More repetitions should be used so that the test will fail if insufficient storage is allocated. More storage should be allocated in the test, too- currently only a single iteration's worth is allocated.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)