jihoonson commented on a change in pull request #5471: Implement force push 
down for nested group by query
URL: https://github.com/apache/incubator-druid/pull/5471#discussion_r204899786
 
 

 ##########
 File path: 
processing/src/main/java/io/druid/query/groupby/epinephelinae/GroupByRowProcessor.java
 ##########
 @@ -98,7 +112,18 @@
                                        ? BooleanValueMatcher.of(true)
                                        : 
filter.makeMatcher(columnSelectorFactory);
 
-    final FilteredSequence<Row> filteredSequence = new FilteredSequence<>(
+    final FilteredSequence<Row> filteredSequence = wasQueryPushedDown ? new 
FilteredSequence<>(
+        rows,
+        new Predicate<Row>()
+        {
+          @Override
+          public boolean apply(Row input)
+          {
+            rowSupplier.set(input);
+            return true; // nothing to filter since it has already been done 
on the push down
 
 Review comment:
   If this is the case, I believe it's much faster to call `final 
AggregateResult retVal = rows.accumulate(AggregateResult.ok(), accumulator);` 
at 
https://github.com/apache/incubator-druid/pull/5471/files#diff-dfac707f8edd4ee002b9f3372cfc2699R192.
 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to