GWphua commented on code in PR #19016:
URL: https://github.com/apache/druid/pull/19016#discussion_r2958258661


##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/CompactionTaskTest.java:
##########
@@ -2032,6 +2039,247 @@ public void drop(DataSegment segment)
         .build();
   }
 
+  @Test
+  public void testFindSegmentsToLockReturnsAllSegmentsForMinorCompaction() 
throws Exception
+  {
+    final Interval testInterval = 
Intervals.of("2024-11-18T00:00:00.000Z/2024-11-25T00:00:00.000Z");
+    final String version = "2024-11-17T23:49:06.823Z";
+
+    final List<DataSegment> allSegmentsInInterval = new ArrayList<>();
+    allSegmentsInInterval.add(createSegmentWithPartition(testInterval, 
version, 0));
+    allSegmentsInInterval.add(createSegmentWithPartition(testInterval, 
version, 2));
+    allSegmentsInInterval.add(createSegmentWithPartition(testInterval, 
version, 4));
+    final DataSegment segment6 = createSegmentWithPartition(testInterval, 
version, 6);
+    final DataSegment segment7 = createSegmentWithPartition(testInterval, 
version, 7);
+    final DataSegment segment8 = createSegmentWithPartition(testInterval, 
version, 8);
+    allSegmentsInInterval.add(segment6);
+    allSegmentsInInterval.add(segment7);
+    allSegmentsInInterval.add(segment8);
+    allSegmentsInInterval.add(createSegmentWithPartition(testInterval, 
version, 10));
+    allSegmentsInInterval.add(createSegmentWithPartition(testInterval, 
version, 12));
+
+    final MinorCompactionInputSpec minorSpec = new MinorCompactionInputSpec(
+        testInterval,
+        ImmutableList.of(segment6.toDescriptor(), segment7.toDescriptor(), 
segment8.toDescriptor())

Review Comment:
   Sure, it will also be nice to include a standard for using this over other 
APIs. (Thought i forsee a large amount of changes that may come with it 🥴)



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to