trushev commented on code in PR #7761:
URL: https://github.com/apache/hudi/pull/7761#discussion_r1090203187


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/RecordIterators.java:
##########
@@ -50,8 +50,7 @@ public static ClosableIterator<RowData> 
getParquetRecordIterator(
       Path path,
       long splitStart,
       long splitLength) throws IOException {
-    InternalSchema fileSchema = 
internalSchemaManager.getFileSchema(path.getName());

Review Comment:
   Why did you move this code into else branch?
   `getFileSchema()` may return empty schema which allow us avoiding  
unnecessary creation of `ParquetSplitRecordIterator`
   
   ```java
     if (querySchema.equals(fileSchema)) {
       return InternalSchema.getEmptyInternalSchema();
     }
   ```



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