danny0405 commented on code in PR #11069:
URL: https://github.com/apache/hudi/pull/11069#discussion_r1575652974
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/clustering/run/strategy/MultipleSparkJobExecutionStrategy.java:
##########
@@ -361,7 +369,15 @@ private HoodieData<HoodieRecord<T>>
readRecordsForGroupBaseFiles(JavaSparkContex
List<Iterator<HoodieRecord<T>>> iteratorsForPartition = new
ArrayList<>();
clusteringOpsPartition.forEachRemaining(clusteringOp -> {
try {
- Schema readerSchema = HoodieAvroUtils.addMetadataFields(new
Schema.Parser().parse(writeConfig.getSchema()));
+ TableSchemaResolver schemaUtil = new
TableSchemaResolver(getHoodieTable().getMetaClient());
+ Schema readerSchema;
+ try {
+ readerSchema = schemaUtil.getTableAvroSchema(true);
+ } catch (Exception e) {
+ LOG.warn(e.getMessage());
+ readerSchema = HoodieAvroUtils.addMetadataFields(new
Schema.Parser().parse(writeConfig.getSchema()));
+ }
Review Comment:
So we are using the latest table schema for clustering, that makes sense to
me.
--
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]