the-other-tim-brown commented on code in PR #13383:
URL: https://github.com/apache/hudi/pull/13383#discussion_r2127364507
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -634,19 +636,15 @@ private Pair<Integer, HoodieData<HoodieRecord>>
initializeExpressionIndexPartiti
if (entry.getValue().getBaseFile().isPresent()) {
partitionFilePathSizeTriplet.add(Pair.of(entry.getKey(),
Pair.of(entry.getValue().getBaseFile().get().getPath(),
entry.getValue().getBaseFile().get().getFileLen())));
}
- entry.getValue().getLogFiles().forEach(hoodieLogFile -> {
- if (entry.getValue().getLogFiles().count() > 0) {
- entry.getValue().getLogFiles().forEach(logfile -> {
- partitionFilePathSizeTriplet.add(Pair.of(entry.getKey(),
Pair.of(logfile.getPath().toString(), logfile.getFileSize())));
- });
- }
- });
+ entry.getValue().getLogFiles()
+ .forEach(hoodieLogFile ->
partitionFilePathSizeTriplet.add(Pair.of(entry.getKey(),
Pair.of(hoodieLogFile.getPath().toString(), hoodieLogFile.getFileSize()))));
});
int fileGroupCount =
dataWriteConfig.getMetadataConfig().getExpressionIndexFileGroupCount();
int parallelism = Math.min(partitionFilePathSizeTriplet.size(),
dataWriteConfig.getMetadataConfig().getExpressionIndexParallelism());
- Schema readerSchema =
getProjectedSchemaForExpressionIndex(indexDefinition, dataMetaClient);
- return Pair.of(fileGroupCount,
getExpressionIndexRecords(partitionFilePathSizeTriplet, indexDefinition,
dataMetaClient, parallelism, readerSchema, storageConf, dataTableInstantTime));
+ Schema tableSchema = new
TableSchemaResolver(dataMetaClient).getTableAvroSchema();
Review Comment:
Updated the latest commit to include this. Let me know if I missed any spots.
--
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]