zachjsh commented on code in PR #15710:
URL: https://github.com/apache/druid/pull/15710#discussion_r1456580595


##########
server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataQuery.java:
##########
@@ -438,6 +466,11 @@ private UnmodifiableIterator<DataSegment> 
retrieveSegmentsInIntervalsBatch(
       appendConditionForIntervalsAndMatchMode(sb, intervals, matchMode, 
connector);
     }
 
+    // Add the used_status_last_updated time filter only for unused segments 
when maxUsedFlagLastUpdatedTime is non-null.
+    if (!used && maxUsedFlagLastUpdatedTime != null) {

Review Comment:
   nit: could assign this expression  to local variable `boolean 
filterByUsedStatusLastUpdated = !used && maxUsedFlagLastUpdatedTime != null`, 
so we dont have to compute again. No biggie obviously though.



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