@Override public boolean doMergeResults(final GroupByQuery query) { return query.getContextBoolean(GroupByQueryQueryToolChest.GROUP_BY_MERGE_KEY, true); }
@JsonIgnore public boolean getApplyLimitPushDownFromContext() { return getContextBoolean(GroupByQueryConfig.CTX_KEY_APPLY_LIMIT_PUSH_DOWN, true); }
@JsonIgnore public boolean getContextSortByDimsFirst() { return getContextBoolean(CTX_KEY_SORT_BY_DIMS_FIRST, false); }
private boolean validateAndGetForceLimitPushDown() { final boolean forcePushDown = getContextBoolean(GroupByQueryConfig.CTX_KEY_FORCE_LIMIT_PUSH_DOWN, false); if (forcePushDown) { if (!(limitSpec instanceof DefaultLimitSpec)) { throw new IAE("When forcing limit push down, a limit spec must be provided."); } if (!((DefaultLimitSpec) limitSpec).isLimited()) { throw new IAE("When forcing limit push down, the provided limit spec must have a limit."); } if (havingSpec != null) { throw new IAE("Cannot force limit push down when a having spec is present."); } for (OrderByColumnSpec orderBySpec : ((DefaultLimitSpec) limitSpec).getColumns()) { if (OrderByColumnSpec.getPostAggIndexForOrderBy(orderBySpec, postAggregatorSpecs) > -1) { throw new UnsupportedOperationException("Limit push down when sorting by a post aggregator is not supported."); } } } return forcePushDown; }
newConfig.singleThreaded = query.getContextBoolean(CTX_KEY_IS_SINGLE_THREADED, isSingleThreaded()); newConfig.maxIntermediateRows = Math.min( query.getContextValue(CTX_KEY_MAX_INTERMEDIATE_ROWS, getMaxIntermediateRows()), getMaxMergingDictionarySize() ); newConfig.forcePushDownLimit = query.getContextBoolean(CTX_KEY_FORCE_LIMIT_PUSH_DOWN, isForcePushDownLimit()); newConfig.forceHashAggregation = query.getContextBoolean(CTX_KEY_FORCE_HASH_AGGREGATION, isForceHashAggregation()); newConfig.intermediateCombineDegree = query.getContextValue( CTX_KEY_INTERMEDIATE_COMBINE_DEGREE,
final boolean forceChainedExecution = query.getContextBoolean( CTX_KEY_MERGE_RUNNERS_USING_CHAINED_EXECUTION, false
if (query.getContextBoolean(CTX_KEY_OUTERMOST, true)) { return query.postProcess(rowSequence); } else {