danny0405 commented on code in PR #13632:
URL: https://github.com/apache/hudi/pull/13632#discussion_r2234616042
##########
hudi-hadoop-common/src/main/java/org/apache/hudi/io/hadoop/HoodieAvroOrcReader.java:
##########
@@ -86,9 +88,16 @@ public ClosableIterator<IndexedRecord>
getIndexedRecordIterator(Schema readerSch
Configuration hadoopConf = storage.getConf().unwrapAs(Configuration.class);
try (Reader reader = OrcFile.createReader(new Path(path.toUri()),
OrcFile.readerOptions(hadoopConf))) {
- TypeDescription orcSchema = AvroOrcUtils.createOrcSchema(readerSchema);
- RecordReader recordReader = reader.rows(new
Options(hadoopConf).schema(orcSchema));
- return new OrcReaderIterator<>(recordReader, readerSchema, orcSchema);
+ TypeDescription fileSchema = reader.getSchema();
Review Comment:
why cann't we just read the file with reader schema? The columnar file
projection is more efficient than the avro rewrite.
--
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]