phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JamesRTaylor <...@git.apache.org>
Subject [GitHub] phoenix pull request #308: Client-side hash aggregation
Date Thu, 19 Jul 2018 21:47:30 GMT
Github user JamesRTaylor commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/308#discussion_r203879864
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/execute/ClientAggregatePlan.java
---
    @@ -135,17 +142,24 @@ public ResultIterator iterator(ParallelScanGrouper scanGrouper,
Scan scan) throw
                 aggResultIterator = new ClientUngroupedAggregatingResultIterator(LookAheadResultIterator.wrap(iterator),
serverAggregators);
                 aggResultIterator = new UngroupedAggregatingResultIterator(LookAheadResultIterator.wrap(aggResultIterator),
clientAggregators);
             } else {
    -            if (!groupBy.isOrderPreserving()) {
    -                int thresholdBytes = context.getConnection().getQueryServices().getProps().getInt(
    -                        QueryServices.SPOOL_THRESHOLD_BYTES_ATTRIB, QueryServicesOptions.DEFAULT_SPOOL_THRESHOLD_BYTES);
    -                List<Expression> keyExpressions = groupBy.getKeyExpressions();
    +            List<Expression> keyExpressions = groupBy.getKeyExpressions();
    +            if (groupBy.isOrderPreserving()) {
    +                aggResultIterator = new ClientGroupedAggregatingResultIterator(LookAheadResultIterator.wrap(iterator),
serverAggregators, keyExpressions);
    --- End diff --
    
    Pass through context here too to ClientGroupedAggregatingResultIterator as you'll need
it to get the memory manager. 


---

Mime
View raw message