uds5501 commented on code in PR #18108:
URL: https://github.com/apache/druid/pull/18108#discussion_r2139210031


##########
server/src/test/java/org/apache/druid/metadata/SqlSegmentsMetadataQueryTest.java:
##########
@@ -238,6 +238,56 @@ public void 
test_retrieveSegmentForId_returnsNull_forUnknownId()
     );
   }
 
+  @Test
+  public void test_retrieveUsedSegments_withOverlapsCondition()
+  {
+    Interval queryInterval = new 
Interval("2025-01-03T00:00:00.000Z/2025-01-05T00:00:00.000Z");
+
+    Set<DataSegment> result = readAsSet(q -> 
q.retrieveUsedSegments(TestDataSource.WIKI, List.of(queryInterval)));
+
+    Assert.assertEquals(4, result.size());
+    assertSegmentsInInterval(result, queryInterval);
+  }
+
+  @Test
+  public void 
test_retrieveUsedSegments_withOverlapsConditionAndUnusedSegments()
+  {
+    final Set<DataSegment> segmentsToUpdate = 
Set.of(WIKI_SEGMENTS_2X5D.get(2));
+    int numUpdatedSegments = update(
+        sql -> sql.markSegmentsAsUnused(getIds(segmentsToUpdate), 
DateTimes.nowUtc()));

Review Comment:
   this one doesn't auto correct using intellij, is this the standard 
expectation?



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