disq commented on code in PR #34631:
URL: https://github.com/apache/arrow/pull/34631#discussion_r1159401111
##########
go/parquet/pqarrow/encode_arrow_test.go:
##########
@@ -917,17 +963,20 @@ var fullTypeList = []arrow.DataType{
func (ps *ParquetIOTestSuite) TestSingleColumnRequiredWrite() {
for _, dt := range fullTypeList {
ps.Run(dt.Name(), func() {
- values := testutils.RandomNonNull(dt, smallSize)
+ mem :=
memory.NewCheckedAllocator(memory.NewGoAllocator())
+ defer mem.AssertSize(ps.T(), 0)
+
+ values := testutils.RandomNonNull(mem, dt, smallSize)
+ defer values.Release()
sc := ps.makeSimpleSchema(dt,
parquet.Repetitions.Required)
- data := ps.writeColumn(sc, values)
- ps.readAndCheckSingleColumnFile(data, values)
+ data := ps.writeColumn(mem, sc, values)
+ ps.readAndCheckSingleColumnFile(mem, data, values)
})
}
}
-func (ps *ParquetIOTestSuite) roundTripTable(expected arrow.Table, storeSchema
bool) {
- mem := memory.NewCheckedAllocator(memory.NewGoAllocator())
- defer mem.AssertSize(ps.T(), 0)
+func (ps *ParquetIOTestSuite) roundTripTable(mem memory.Allocator, expected
arrow.Table, storeSchema bool) {
+ mem = memory.NewGoAllocator() // FIXME currently overriding allocator
to isolate leaks between roundTripTable and caller
Review Comment:
Maybe having CheckedAllocator everywhere wasn't a good idea
--
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]