Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/22399#discussion_r216968827 --- Diff: sql/catalyst/src/test/java/org/apache/spark/sql/catalyst/expressions/RowBasedKeyValueBatchSuite.java --- @@ -293,18 +276,16 @@ public void fixedLengthTest() throws Exception { Assert.assertTrue(checkKey(key3, 33, 33)); Assert.assertTrue(checkValue(value3, 3, 3)); Assert.assertFalse(iterator.next()); - } finally { - batch.close(); } } @Test public void appendRowUntilExceedingCapacity() throws Exception { - RowBasedKeyValueBatch batch = RowBasedKeyValueBatch.allocate(keySchema, - valueSchema, taskMemoryManager, 10); - try { - UnsafeRow key = makeKeyRow(1, "A"); - UnsafeRow value = makeValueRow(1, 1); + UnsafeRow key = makeKeyRow(1, "A"); --- End diff -- Can we put `key` and `value` inside `try`?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org