hellishfire commented on code in PR #2951:
URL: https://github.com/apache/parquet-java/pull/2951#discussion_r1676994650
##########
parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestParquetFileWriter.java:
##########
@@ -286,6 +286,9 @@ public void testWriteRead() throws Exception {
w.endColumn();
w.endBlock();
w.end(new HashMap<String, String>());
+ // Although writer is already closed in previous end(),
+ // explicitly close it again to verify double close behavior.
+ w.close();
Review Comment:
I didn't do this for two reasons:
1 The verification codes following this write operation use multiple local
variables declared during the write (e.g. c1Starts c1p1Starts c1Ends). It's a
pain to pre declare all these variables before the try block.
2 Each test in this test file is coded like this, so it's a pain to refactor
all usages of ParquetFileWriter here.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]