danny0405 commented on a change in pull request #3267: URL: https://github.com/apache/hudi/pull/3267#discussion_r670926655
########## File path: hudi-common/src/main/java/org/apache/hudi/common/table/log/AbstractHoodieLogRecordScanner.java ########## @@ -113,8 +120,11 @@ protected AbstractHoodieLogRecordScanner(FileSystem fs, String basePath, List<St this.readerSchema = readerSchema; this.latestInstantTime = latestInstantTime; this.hoodieTableMetaClient = HoodieTableMetaClient.builder().setConf(fs.getConf()).setBasePath(basePath).build(); + this.orderingField = this.hoodieTableMetaClient.getTableConfig().getPreCombineField(); // load class from the payload fully qualified class name this.payloadClassFQN = this.hoodieTableMetaClient.getTableConfig().getPayloadClass(); + // only the OverwriteWithLatestAvroPayload needs combining by orderingVal + this.naturalOrder = !OverwriteWithLatestAvroPayload.class.isAssignableFrom(ReflectionUtils.getClass(this.payloadClassFQN)); Review comment: Agree, would add a new constructor. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org