danny0405 commented on code in PR #13572:
URL: https://github.com/apache/hudi/pull/13572#discussion_r2233994618
##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/HoodieFileGroupReader.java:
##########
@@ -219,12 +219,12 @@ private ClosableIterator<T> makeBaseFileIterator() throws
IOException {
if (baseFileStoragePathInfo != null) {
recordIterator = readerContext.getFileRecordIterator(
baseFileStoragePathInfo, inputSplit.start, inputSplit.length,
- readerContext.getSchemaHandler().getTableSchema(),
+ readerContext.isMetadataTable() ||
readerContext.getSchemaHandler().internalSchemaOpt.isPresent() ?
Option.of(readerContext.getSchemaHandler().getTableSchema()) : Option.empty(),
Review Comment:
If we scope is to fix behaviors for schema on read (when
`hoodie.schema.on.read.enable`), we should always fetch data file schema from
internal schema history metadata instead of reading the file footers, probably
introducing something like `InternalSchemaManager` which alrealdy works for
Flink data file schema fetch.
--
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]