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

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

public class QBParseInfo
extends Object

Implementation of the parse information related to a query block


Constructor Summary
QBParseInfo(String alias, boolean isSubQ)
           
 
Method Summary
 HashMap<String,ASTNode> getAggregationExprsForClause(String clause)
           
 String getAlias()
           
 Set<String> getClauseNames()
           
 Set<String> getClauseNamesForDest()
           
 ASTNode getClusterByForClause(String clause)
          Get the Cluster By AST for the clause.
 ASTNode getDestForClause(String clause)
           
 Integer getDestLimit(String dest)
           
 HashMap<String,ASTNode> getDestToClusterBy()
           
 HashMap<String,ASTNode> getDestToDistributeBy()
           
 HashMap<String,ASTNode> getDestToSortBy()
           
 HashMap<String,ASTNode> getDestToWhereExpr()
           
 ASTNode getDistinctFuncExprForClause(String clause)
           
 ASTNode getDistributeByForClause(String clause)
          Get the Distribute By AST for the clause.
 ASTNode getGroupByForClause(String clause)
           
 boolean getIsSubQ()
           
 ASTNode getJoinExpr()
           
 int getOuterQueryLimit()
           
 ASTNode getSelForClause(String clause)
           
 ASTNode getSortByForClause(String clause)
          Get the Sort By AST for the clause.
 ASTNode getSrcForAlias(String alias)
           
 TableSample getTabSample(String alias)
           
 ASTNode getWhrForClause(String clause)
           
 boolean isSelectStarQuery()
           
 void setAggregationExprsForClause(String clause, LinkedHashMap<String,ASTNode> aggregationTrees)
           
 void setClusterByExprForClause(String clause, ASTNode ast)
          Set the Cluster By AST for the clause.
 void setDestForClause(String clause, ASTNode ast)
           
 void setDestLimit(String dest, Integer limit)
           
 void setDistinctFuncExprForClause(String clause, ASTNode ast)
           
 void setDistributeByExprForClause(String clause, ASTNode ast)
          Set the Distribute By AST for the clause.
 void setGroupByExprForClause(String clause, ASTNode ast)
           
 void setJoinExpr(ASTNode joinExpr)
           
 void setOuterQueryLimit(int outerQueryLimit)
           
 void setSelExprForClause(String clause, ASTNode ast)
           
 void setSortByExprForClause(String clause, ASTNode ast)
          Set the Sort By AST for the clause.
 void setSrcForAlias(String alias, ASTNode ast)
           
 void setTabSample(String alias, TableSample tableSample)
           
 void setWhrExprForClause(String clause, ASTNode ast)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QBParseInfo

public QBParseInfo(String alias,
                   boolean isSubQ)
Method Detail

setAggregationExprsForClause

public void setAggregationExprsForClause(String clause,
                                         LinkedHashMap<String,ASTNode> aggregationTrees)

getAggregationExprsForClause

public HashMap<String,ASTNode> getAggregationExprsForClause(String clause)

setDistinctFuncExprForClause

public void setDistinctFuncExprForClause(String clause,
                                         ASTNode ast)

getDistinctFuncExprForClause

public ASTNode getDistinctFuncExprForClause(String clause)

setSelExprForClause

public void setSelExprForClause(String clause,
                                ASTNode ast)

setWhrExprForClause

public void setWhrExprForClause(String clause,
                                ASTNode ast)

setGroupByExprForClause

public void setGroupByExprForClause(String clause,
                                    ASTNode ast)

setDestForClause

public void setDestForClause(String clause,
                             ASTNode ast)

setClusterByExprForClause

public void setClusterByExprForClause(String clause,
                                      ASTNode ast)
Set the Cluster By AST for the clause.

Parameters:
clause - the name of the clause
ast - the abstract syntax tree

setDistributeByExprForClause

public void setDistributeByExprForClause(String clause,
                                         ASTNode ast)
Set the Distribute By AST for the clause.

Parameters:
clause - the name of the clause
ast - the abstract syntax tree

setSortByExprForClause

public void setSortByExprForClause(String clause,
                                   ASTNode ast)
Set the Sort By AST for the clause.

Parameters:
clause - the name of the clause
ast - the abstract syntax tree

setSrcForAlias

public void setSrcForAlias(String alias,
                           ASTNode ast)

getClauseNames

public Set<String> getClauseNames()

getClauseNamesForDest

public Set<String> getClauseNamesForDest()

getDestForClause

public ASTNode getDestForClause(String clause)

getWhrForClause

public ASTNode getWhrForClause(String clause)

getDestToWhereExpr

public HashMap<String,ASTNode> getDestToWhereExpr()

getGroupByForClause

public ASTNode getGroupByForClause(String clause)

getSelForClause

public ASTNode getSelForClause(String clause)

getClusterByForClause

public ASTNode getClusterByForClause(String clause)
Get the Cluster By AST for the clause.

Parameters:
clause - the name of the clause
Returns:
the abstract syntax tree

getDestToClusterBy

public HashMap<String,ASTNode> getDestToClusterBy()

getDistributeByForClause

public ASTNode getDistributeByForClause(String clause)
Get the Distribute By AST for the clause.

Parameters:
clause - the name of the clause
Returns:
the abstract syntax tree

getDestToDistributeBy

public HashMap<String,ASTNode> getDestToDistributeBy()

getSortByForClause

public ASTNode getSortByForClause(String clause)
Get the Sort By AST for the clause.

Parameters:
clause - the name of the clause
Returns:
the abstract syntax tree

getDestToSortBy

public HashMap<String,ASTNode> getDestToSortBy()

getSrcForAlias

public ASTNode getSrcForAlias(String alias)

getAlias

public String getAlias()

getIsSubQ

public boolean getIsSubQ()

getJoinExpr

public ASTNode getJoinExpr()

setJoinExpr

public void setJoinExpr(ASTNode joinExpr)

getTabSample

public TableSample getTabSample(String alias)

setTabSample

public void setTabSample(String alias,
                         TableSample tableSample)

setDestLimit

public void setDestLimit(String dest,
                         Integer limit)

getDestLimit

public Integer getDestLimit(String dest)

getOuterQueryLimit

public int getOuterQueryLimit()
Returns:
the outerQueryLimit

setOuterQueryLimit

public void setOuterQueryLimit(int outerQueryLimit)
Parameters:
outerQueryLimit - the outerQueryLimit to set

isSelectStarQuery

public boolean isSelectStarQuery()


Copyright © 2009 The Apache Software Foundation