org.apache.hadoop.hive.ql.optimizer
Class StatsOptimizer
java.lang.Object
org.apache.hadoop.hive.ql.optimizer.StatsOptimizer
- All Implemented Interfaces:
- Transform
public class StatsOptimizer
- extends Object
- implements Transform
There is a set of queries which can be answered entirely from statistics stored in metastore.
Examples of such queries are count(*), count(a), max(a), min(b) etc. Hive already collects
these basic statistics for query planning purposes. These same statistics can be used to
answer queries also.
Optimizer looks at query plan to determine if it can answer query using statistics
and than change the plan to answer query entirely using statistics stored in metastore.
StatsOptimizer
public StatsOptimizer()
transform
public ParseContext transform(ParseContext pctx)
throws SemanticException
- Description copied from interface:
Transform
- All transformation steps implement this interface.
- Specified by:
transform
in interface Transform
- Parameters:
pctx
- input parse context
- Returns:
- ParseContext
- Throws:
SemanticException
Copyright © 2014 The Apache Software Foundation. All rights reserved.