rmahindra123 commented on code in PR #9455:
URL: https://github.com/apache/hudi/pull/9455#discussion_r1298101660


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/commit/HoodieMergeHelper.java:
##########
@@ -157,6 +157,10 @@ public void runMerge(HoodieTable<?, ?, ?, ?> table,
         baseFileReader.close();
         mergeHandle.close();
       }
+
+      if (baseFileReader != null) {
+        baseFileReader.close();
+      }

Review Comment:
   Add fix



##########
hudi-common/src/main/java/org/apache/hudi/common/table/TableSchemaResolver.java:
##########
@@ -327,8 +327,9 @@ private MessageType readSchemaFromHFileBaseFile(Path 
hFilePath) throws IOExcepti
 
     FileSystem fs = metaClient.getRawFs();
     CacheConfig cacheConfig = new CacheConfig(fs.getConf());
-    HoodieAvroHFileReader hFileReader = new 
HoodieAvroHFileReader(fs.getConf(), hFilePath, cacheConfig);
-    return convertAvroSchemaToParquet(hFileReader.getSchema());
+    try (HoodieAvroHFileReader hFileReader = new 
HoodieAvroHFileReader(fs.getConf(), hFilePath, cacheConfig)) {

Review Comment:
   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]

Reply via email to