ahshahid commented on code in PR #1309:
URL: https://github.com/apache/parquet-mr/pull/1309#discussion_r1555282274


##########
parquet-column/src/main/java/org/apache/parquet/column/values/plain/PlainValuesWriter.java:
##########
@@ -126,8 +128,18 @@ public void reset() {
 
   @Override
   public void close() {
-    arrayOut.close();
-    out.close();
+    try (AutoCloseableResources ignored = new AutoCloseableResources(arrayOut, 
out)) {
+      try {
+        arrayOut.flush();
+      } catch (IOException ignore) {
+      }
+      try {
+        out.flush();
+      } catch (IOException ignore) {

Review Comment:
   will add



##########
parquet-common/src/main/java/org/apache/parquet/bytes/LittleEndianDataOutputStream.java:
##########
@@ -208,9 +208,9 @@ public final void writeDouble(double v) throws IOException {
   }
 
   public void close() {
-    try {
-      out.close();
-    } catch (IOException e) {
+    try (OutputStream os = this.out) {
+      os.flush();
+    } catch (Exception e) {
       // swallow exception

Review Comment:
   will add .



-- 
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]

Reply via email to