public class RewriteGBUsingIndex extends Object implements Transform
select count(key)
from table
group by key;
to
select sum(_count_of_key)
from idx_table
group by key;
The rewrite supports following queries:
AggregateIndexHandler
,
IndexUtils
,
RewriteCanApplyCtx
,
RewriteCanApplyProcFactory
,
RewriteParseContextGenerator
,
RewriteQueryUsingAggregateIndexCtx
,
For test cases, @see ql_rewrite_gbtoidx.q
Constructor and Description |
---|
RewriteGBUsingIndex() |
public ParseContext transform(ParseContext pctx) throws SemanticException
Transform
transform
in interface Transform
pctx
- input parse contextSemanticException
Copyright © 2017 The Apache Software Foundation. All rights reserved.