danny0405 commented on code in PR #13632:
URL: https://github.com/apache/hudi/pull/13632#discussion_r2236045820
##########
hudi-hadoop-common/src/main/java/org/apache/hudi/common/util/OrcUtils.java:
##########
@@ -117,25 +117,17 @@ public ClosableIterator<HoodieKey>
getHoodieKeyIterator(HoodieStorage storage, S
conf.addResource(HadoopFSUtils.getFs(filePath.toString(),
conf).getConf());
Reader reader = OrcFile.createReader(convertToHadoopPath(filePath),
OrcFile.readerOptions(conf));
- Schema readSchema = HoodieAvroUtils.getRecordKeyPartitionPathSchema();
+ Schema readSchema = keyGeneratorOpt
+ .map(keyGenerator -> {
+ List<String> fields = new ArrayList<>();
+ fields.addAll(keyGenerator.getRecordKeyFieldNames());
+ fields.addAll(keyGenerator.getPartitionPathFields());
+ return HoodieAvroUtils.projectSchema(readAvroSchema(storage,
filePath), fields);
Review Comment:
not sure. record key and partition path fields are usually forbidden to
evolve.
--
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]