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

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

public class ParseContext
extends Object

Parse Context: The current parse context. This is passed to the optimizer which then transforms the operator tree using the parse context. All the optimizations are performed sequentially and then the new parse context populated. Note that since the parse context contains the operator tree, it can be easily retrieved by the next optimization step or finally for task generation after the plan has been completely optimized.


Constructor Summary
ParseContext(HiveConf conf, QB qb, ASTNode ast, HashMap<String,PartitionPruner> aliasToPruner, HashMap<String,SamplePruner> aliasToSamplePruner, HashMap<String,Operator<? extends Serializable>> topOps, HashMap<String,Operator<? extends Serializable>> topSelOps, HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx, List<loadTableDesc> loadTableWork, List<loadFileDesc> loadFileWork, Context ctx, HashMap<String,String> idToTableNameMap, int destTableId, UnionProcContext uCtx)
           
 
Method Summary
 HashMap<String,PartitionPruner> getAliasToPruner()
           
 HashMap<String,SamplePruner> getAliasToSamplePruner()
           
 HiveConf getConf()
           
 Context getContext()
           
 int getDestTableId()
           
 HashMap<String,String> getIdToTableNameMap()
           
 List<loadFileDesc> getLoadFileWork()
           
 List<loadTableDesc> getLoadTableWork()
           
 HashMap<Operator<? extends Serializable>,OpParseContext> getOpParseCtx()
           
 ASTNode getParseTree()
           
 QB getQB()
           
 HashMap<String,Operator<? extends Serializable>> getTopOps()
           
 HashMap<String,Operator<? extends Serializable>> getTopSelOps()
           
 UnionProcContext getUCtx()
           
 void setAliasToPruner(HashMap<String,PartitionPruner> aliasToPruner)
           
 void setAliasToSamplePruner(HashMap<String,SamplePruner> aliasToSamplePruner)
           
 void setConf(HiveConf conf)
           
 void setContext(Context ctx)
           
 void setDestTableId(int destTableId)
           
 void setIdToTableNameMap(HashMap<String,String> idToTableNameMap)
           
 void setLoadFileWork(List<loadFileDesc> loadFileWork)
           
 void setLoadTableWork(List<loadTableDesc> loadTableWork)
           
 void setOpParseCtx(HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx)
           
 void setParseTree(ASTNode ast)
           
 void setQB(QB qb)
           
 void setTopOps(HashMap<String,Operator<? extends Serializable>> topOps)
           
 void setTopSelOps(HashMap<String,Operator<? extends Serializable>> topSelOps)
           
 void setUCtx(UnionProcContext uCtx)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParseContext

public ParseContext(HiveConf conf,
                    QB qb,
                    ASTNode ast,
                    HashMap<String,PartitionPruner> aliasToPruner,
                    HashMap<String,SamplePruner> aliasToSamplePruner,
                    HashMap<String,Operator<? extends Serializable>> topOps,
                    HashMap<String,Operator<? extends Serializable>> topSelOps,
                    HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx,
                    List<loadTableDesc> loadTableWork,
                    List<loadFileDesc> loadFileWork,
                    Context ctx,
                    HashMap<String,String> idToTableNameMap,
                    int destTableId,
                    UnionProcContext uCtx)
Parameters:
qb - current QB
ast - current parse tree
aliasToPruner - partition pruner list
aliasToSamplePruner - sample pruner list
loadFileWork - list of destination files being loaded
loadTableWork - list of destination tables being loaded
opParseCtx - operator parse context - contains a mapping from operator to operator parse state (row resolver etc.)
topOps - list of operators for the top query
topSelOps - list of operators for the selects introduced for column pruning
Method Detail

getQB

public QB getQB()
Returns:
the qb

setQB

public void setQB(QB qb)
Parameters:
qb - the qb to set

getContext

public Context getContext()
Returns:
the context

setContext

public void setContext(Context ctx)
Parameters:
ctx - the context to set

getConf

public HiveConf getConf()
Returns:
the hive conf

setConf

public void setConf(HiveConf conf)
Parameters:
conf - the conf to set

getParseTree

public ASTNode getParseTree()
Returns:
the ast

setParseTree

public void setParseTree(ASTNode ast)
Parameters:
ast - the parsetree to set

getAliasToPruner

public HashMap<String,PartitionPruner> getAliasToPruner()
Returns:
the aliasToPruner

setAliasToPruner

public void setAliasToPruner(HashMap<String,PartitionPruner> aliasToPruner)
Parameters:
aliasToPruner - the aliasToPruner to set

getAliasToSamplePruner

public HashMap<String,SamplePruner> getAliasToSamplePruner()
Returns:
the aliasToSamplePruner

setAliasToSamplePruner

public void setAliasToSamplePruner(HashMap<String,SamplePruner> aliasToSamplePruner)
Parameters:
aliasToSamplePruner - the aliasToSamplePruner to set

getTopOps

public HashMap<String,Operator<? extends Serializable>> getTopOps()
Returns:
the topOps

setTopOps

public void setTopOps(HashMap<String,Operator<? extends Serializable>> topOps)
Parameters:
topOps - the topOps to set

getTopSelOps

public HashMap<String,Operator<? extends Serializable>> getTopSelOps()
Returns:
the topSelOps

setTopSelOps

public void setTopSelOps(HashMap<String,Operator<? extends Serializable>> topSelOps)
Parameters:
topSelOps - the topSelOps to set

getOpParseCtx

public HashMap<Operator<? extends Serializable>,OpParseContext> getOpParseCtx()
Returns:
the opParseCtx

setOpParseCtx

public void setOpParseCtx(HashMap<Operator<? extends Serializable>,OpParseContext> opParseCtx)
Parameters:
opParseCtx - the opParseCtx to set

getLoadTableWork

public List<loadTableDesc> getLoadTableWork()
Returns:
the loadTableWork

setLoadTableWork

public void setLoadTableWork(List<loadTableDesc> loadTableWork)
Parameters:
loadTableWork - the loadTableWork to set

getLoadFileWork

public List<loadFileDesc> getLoadFileWork()
Returns:
the loadFileWork

setLoadFileWork

public void setLoadFileWork(List<loadFileDesc> loadFileWork)
Parameters:
loadFileWork - the loadFileWork to set

getIdToTableNameMap

public HashMap<String,String> getIdToTableNameMap()

setIdToTableNameMap

public void setIdToTableNameMap(HashMap<String,String> idToTableNameMap)

getDestTableId

public int getDestTableId()

setDestTableId

public void setDestTableId(int destTableId)

getUCtx

public UnionProcContext getUCtx()

setUCtx

public void setUCtx(UnionProcContext uCtx)


Copyright © 2009 The Apache Software Foundation