leesf commented on code in PR #4966:
URL: https://github.com/apache/hudi/pull/4966#discussion_r1053921440


##########
hudi-client/hudi-spark-client/src/test/java/org/apache/hudi/table/action/cluster/strategy/TestSparkClusteringPlanPartitionFilter.java:
##########
@@ -104,4 +105,20 @@ public void testFilterPartitionSelectedPartitions() {
     assertEquals(1, list.size());
     assertSame("20211222", list.get(0));
   }
+
+  @Test
+  public void testDayRollingPartitionFilter() {
+    HoodieWriteConfig config = 
hoodieWriteConfigBuilder.withClusteringConfig(HoodieClusteringConfig.newBuilder()
+        
.withClusteringPlanPartitionFilterMode(ClusteringPlanPartitionFilterMode.DAY_ROLLING)
+        .build())
+        .build();
+    PartitionAwareClusteringPlanStrategy sg = new 
SparkSizeBasedClusteringPlanStrategy(table, context, config);
+    ArrayList<String> fakeTimeBasedPartitionsPath = new ArrayList<>();
+    for (int i = 0; i < 24; i++) {
+      fakeTimeBasedPartitionsPath.add("20220301" + (i >= 10 ? 
String.valueOf(i) : "0" + i));
+    }
+    List list = sg.filterPartitionPaths(fakeTimeBasedPartitionsPath);

Review Comment:
   `List -> List<String>`



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

Reply via email to