jihoonson commented on a change in pull request #10253:
URL: https://github.com/apache/druid/pull/10253#discussion_r469693037
##########
File path:
processing/src/main/java/org/apache/druid/query/groupby/GroupByQuery.java
##########
@@ -121,6 +120,10 @@ public static Builder builder()
@Nullable
private final DateTime universalTimestamp;
+ private final boolean canPushDownLimit;
+ @Nullable
+ private Boolean forceLimitPushDown;
Review comment:
Yeah, it's nullable to lazily initialize and cache it. Checking the
value of `forceLimitPushDown` is needed a couple of times during a query. Even
though it's not very harmful, I don't see any reason to not cache it.
##########
File path:
processing/src/main/java/org/apache/druid/query/groupby/GroupByQuery.java
##########
@@ -409,7 +412,10 @@ public boolean getContextSortByDimsFirst()
@JsonIgnore
public boolean isApplyLimitPushDown()
{
- return applyLimitPushDown;
+ if (forceLimitPushDown == null) {
+ forceLimitPushDown = validateAndGetForceLimitPushDown();
+ }
+ return forceLimitPushDown || canPushDownLimit;
Review comment:
Renamed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]