yihua commented on code in PR #12524:
URL: https://github.com/apache/hudi/pull/12524#discussion_r1899352857


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/cluster/strategy/ClusteringPlanStrategy.java:
##########
@@ -151,13 +151,16 @@ protected int getPlanVersion() {
    * Transform {@link FileSlice} to {@link HoodieSliceInfo}.
    */
   protected static List<HoodieSliceInfo> getFileSliceInfo(List<FileSlice> 
slices) {
-    return slices.stream().map(slice -> new HoodieSliceInfo().newBuilder()
-        .setPartitionPath(slice.getPartitionPath())
-        .setFileId(slice.getFileId())
-        
.setDataFilePath(slice.getBaseFile().map(BaseFile::getPath).orElse(StringUtils.EMPTY_STRING))
-        .setDeltaFilePaths(slice.getLogFiles().map(f -> 
f.getPath().toString()).collect(Collectors.toList()))
-        .setBootstrapFilePath(slice.getBaseFile().map(bf -> 
bf.getBootstrapBaseFile().map(bbf -> 
bbf.getPath()).orElse(StringUtils.EMPTY_STRING)).orElse(StringUtils.EMPTY_STRING))
-        .build()).collect(Collectors.toList());
+    return slices.stream().map(slice -> {
+      new HoodieSliceInfo();

Review Comment:
   This line is redundant:
   ```
   new HoodieSliceInfo();
   ```
   The return statement already does the job: `HoodieSliceInfo.newBuilder()
             .setPartitionPath(slice.getPartitionPath())...`



-- 
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]

Reply via email to