gianm commented on a change in pull request #12223:
URL: https://github.com/apache/druid/pull/12223#discussion_r839979805



##########
File path: processing/src/main/java/org/apache/druid/query/Druids.java
##########
@@ -869,6 +860,16 @@ public ScanQueryBuilder intervals(QuerySegmentSpec q)
       return this;
     }
 
+    /**
+     * Convenience method for an interval over all time.
+     */
+    public ScanQueryBuilder eternity()

Review comment:
       IMO `intervalsEternity` makes more sense than `eternity()` for the 
reason mentioned by @kfaraz. There's some rhyming between 
`.intervals("2000/2001")` and `.intervalsEternity()`. It sort of visually puts 
"eternity" in the same place as "2000/2001" if you squint your eyes. I'd be 
fine with that.
   
   Alternate approach that I think I like even better: make a constant for `new 
MultipleIntervalSegmentSpec(ImmutableList.of(Intervals.ETERNITY)))`. For 
example, `QuerySegmentSpec.ETERNITY` or even `QuerySegmentSpec.ALL` (since, 
really, what we want is "all segments"). That'd work with all the builders, not 
just the Scan one.
   
   Anyway, I'm fine with both of those. Please choose your favorite.




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