org.apache.hadoop.hive.ql.parse
Class SamplePruner

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.SamplePruner

public class SamplePruner
extends Object

This class stores the mapping from table alias to the parse tree information of the table sample clause(stored in the TableSample class).


Constructor Summary
SamplePruner(String alias, TableSample tableSample)
          Constructs the SamplePruner given the table alias and the table sample
 
Method Summary
 String getTabAlias()
          Gets the table alias
 TableSample getTableSample()
          Gets the parse information of the associated table sample clause
 org.apache.hadoop.fs.Path[] prune(Partition part)
          Prunes to get all the files in the partition that satisfy the TABLESAMPLE clause
 void setTabAlias(String tabAlias)
          Sets the table alias
 void setTableSample(TableSample tableSample)
          Sets the parse information of the associated table sample clause
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SamplePruner

public SamplePruner(String alias,
                    TableSample tableSample)
Constructs the SamplePruner given the table alias and the table sample

Parameters:
alias - The alias of the table specified in the query
tableSample - The parse infromation of the TABLESAMPLE clause
Method Detail

getTabAlias

public String getTabAlias()
Gets the table alias

Returns:
String

setTabAlias

public void setTabAlias(String tabAlias)
Sets the table alias

Parameters:
tabAlias - The table alias as specified in the query

getTableSample

public TableSample getTableSample()
Gets the parse information of the associated table sample clause

Returns:
TableSample

setTableSample

public void setTableSample(TableSample tableSample)
Sets the parse information of the associated table sample clause

Parameters:
tableSample - Information related to the table sample clause

prune

public org.apache.hadoop.fs.Path[] prune(Partition part)
                                  throws SemanticException
Prunes to get all the files in the partition that satisfy the TABLESAMPLE clause

Parameters:
part - The partition to prune
Returns:
Path[]
Throws:
SemanticException


Copyright © 2009 The Apache Software Foundation