org.apache.hadoop.hive.ql.optimizer
Class GlobalLimitOptimizer

java.lang.Object
  extended by 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.


Constructor Summary
GlobalLimitOptimizer()
           
 
Method Summary
 ParseContext transform(ParseContext pctx)
          All transformation steps implement this interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlobalLimitOptimizer

public GlobalLimitOptimizer()
Method Detail

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.