zeroshade commented on code in PR #13770:
URL: https://github.com/apache/arrow/pull/13770#discussion_r935777464
##########
go/arrow/array/list_test.go:
##########
@@ -211,3 +211,190 @@ func TestListArraySlice(t *testing.T) {
t.Fatalf("got=%q, want=%q", got, want)
}
}
+
+func TestLargeListArray(t *testing.T) {
+ pool := memory.NewCheckedAllocator(memory.NewGoAllocator())
+ defer pool.AssertSize(t, 0)
+
+ var (
+ vs = []int32{0, 1, 2, 3, 4, 5, 6}
+ lengths = []int{3, 0, 4}
+ isValid = []bool{true, false, true}
+ offsets = []int64{0, 3, 3, 7}
+ )
+
+ lb := array.NewLargeListBuilder(pool, arrow.PrimitiveTypes.Int32)
+ defer lb.Release()
+
+ for i := 0; i < 10; i++ {
Review Comment:
> is it to try and detect memory management issues?
Basically yes. Calling `NewArray()` should make sure the builder is properly
reset to enable reuse (along with the child builders) without any memory leaks.
So we loop multiple times, building and calling NewArray to ensure that there
are no memory management issues
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]