org.apache.hadoop.hive.ql.optimizer
Class GlobalLimitOptimizer
java.lang.Object
org.apache.hadoop.hive.ql.optimizer.GlobalLimitOptimizer
- All Implemented Interfaces:
- Transform
public class GlobalLimitOptimizer
- extends Object
- implements Transform
This optimizer is used to reduce the input size for the query for queries which are
specifying a limit.
For eg. for a query of type:
select expr from T where limit 100;
Most probably, the whole table T need not be scanned.
Chances are that even if we scan the first file of T, we would get the 100 rows
needed by this query.
This optimizer step populates the GlobalLimitCtx which is used later on to prune the inputs.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GlobalLimitOptimizer
public GlobalLimitOptimizer()
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 © 2013 The Apache Software Foundation