From b0c8bbbab0c819881fab1323fb68f70971a224d7 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Wed, 22 Sep 2021 12:21:31 -0500 Subject: [PATCH] Fix Java column leak in testParquetWriteMap (#9271) Fixes a Java column vector leak in TableTest#testParquetWriteMap. Authors: - Jason Lowe (https://github.com/jlowe) Approvers: - Robert (Bobby) Evans (https://github.com/revans2) URL: https://github.com/rapidsai/cudf/pull/9271 --- java/src/test/java/ai/rapids/cudf/TableTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java/src/test/java/ai/rapids/cudf/TableTest.java b/java/src/test/java/ai/rapids/cudf/TableTest.java index cd1e433d07b..b69dce57180 100644 --- a/java/src/test/java/ai/rapids/cudf/TableTest.java +++ b/java/src/test/java/ai/rapids/cudf/TableTest.java @@ -6669,8 +6669,9 @@ void testParquetWriteMap() throws IOException { HostColumnVector.StructType structType = new HostColumnVector.StructType(true, Arrays.asList(new HostColumnVector.BasicType(true, DType.STRING), new HostColumnVector.BasicType(true, DType.STRING))); - try (Table t0 = new Table(ColumnVector.fromLists(new HostColumnVector.ListType(true, - structType), list1, list2, list3))) { + try (ColumnVector listColumn = ColumnVector.fromLists(new HostColumnVector.ListType(true, + structType), list1, list2, list3); + Table t0 = new Table(listColumn)) { try (TableWriter writer = Table.writeParquetChunked(options, f)) { writer.write(t0); }