danny0405 commented on code in PR #13365:
URL: https://github.com/apache/hudi/pull/13365#discussion_r2146293689
##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/clustering/run/strategy/SparkBinaryCopyClusteringExecutionStrategy.java:
##########
@@ -175,30 +173,17 @@ public boolean
supportBinaryStreamCopy(List<ClusteringGroupInfo> inputGroups, Ma
}
JavaSparkContext engineContext =
HoodieSparkEngineContext.getSparkContext(getEngineContext());
- List<Tuple2<BloomFilterTypeCode, Boolean>> fileStatus =
engineContext.parallelize(inputGroups, inputGroups.size())
+
+ List<ParquetBinaryCopyChecker.ParquetFileInfo> fileStatus =
engineContext.parallelize(inputGroups, inputGroups.size())
.flatMap(group -> group.getOperations().iterator())
.map(op -> {
String filePath = op.getDataFilePath();
- ParquetUtils fileUtils = new ParquetUtils();
- BloomFilter filter =
fileUtils.readBloomFilterFromMetadata(getHoodieTable().getStorage(), new
StoragePath(filePath));
- boolean isLegacySchema = !fileUtils.getFormat().equals(PARQUET) ||
fileUtils.containLegacy2LevelArrayType(getHoodieTable().getStorage(), filePath);
- return Tuple2.apply(filter == null ? null :
filter.getBloomFilterTypeCode(), isLegacySchema);
+ if (!filePath.endsWith(PARQUET.getFileExtension())) {
+ return new ParquetBinaryCopyChecker.ParquetFileInfo(false, "",
Collections.emptyMap());
+ }
+ return
ParquetBinaryCopyChecker.verifyFile(getHoodieTable().getStorageConf().unwrapAs(Configuration.class),
filePath);
Review Comment:
these files would be checked twice with line 187?
--
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]