Skip to content

Commit 08e18e2

Browse files
authored
fix(tests): WriterTestSuite.handleNulls should not overwrite columns (#1920)
1 parent af8ac87 commit 08e18e2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

plugin/nulls.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,11 @@ func (s *WriterTestSuite) replaceNullsByEmptyNestedArray(arr arrow.Array) arrow.
9393

9494
func (s *WriterTestSuite) handleNulls(record arrow.Record) arrow.Record {
9595
cols := record.Columns()
96+
newCols := make([]arrow.Array, len(cols))
9697
for c, col := range cols {
97-
cols[c] = s.handleNullsArray(col)
98+
newCols[c] = s.handleNullsArray(col)
9899
}
99-
return array.NewRecord(record.Schema(), cols, record.NumRows())
100+
return array.NewRecord(record.Schema(), newCols, record.NumRows())
100101
}
101102

102103
func (s *WriterTestSuite) handleNullsArray(arr arrow.Array) arrow.Array {

0 commit comments

Comments
 (0)