the-other-tim-brown commented on code in PR #14340:
URL: https://github.com/apache/hudi/pull/14340#discussion_r2578323746
##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -272,6 +273,48 @@ public ClosableIterator<T> getFileRecordIterator(
return getFileRecordIterator(storagePathInfo.getPath(), start, length,
dataSchema, requiredSchema, storage);
}
+ /**
+ * Gets the record iterator based on the type of engine-specific record
representation from the
+ * file using HoodieSchema.
+ * This method uses HoodieSchema for in-memory processing while maintaining
+ * compatibility with existing Avro-based file reading.
+ *
+ * @param filePath {@link StoragePath} instance of a file.
+ * @param start Starting byte to start reading.
+ * @param length Bytes to read.
+ * @param dataSchema Schema of records in the file in {@link
HoodieSchema}.
+ * @param requiredSchema Schema containing required fields to read in {@link
HoodieSchema} for projection.
+ * @param storage {@link HoodieStorage} for reading records.
+ * @return {@link ClosableIterator<T>} that can return all records through
iteration.
+ * @since 1.2.0
+ */
+ public ClosableIterator<T> getFileRecordIterator(
Review Comment:
Instead of maintaining 2 copies of these methods, can we instead just update
the other methods to take HoodieSchema?
--
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]