public class CandidateFact extends Object implements CandidateTable, QueryAST
Modifier and Type | Method and Description |
---|---|
String |
addAndGetAliasFromSelect(org.apache.hadoop.hive.ql.parse.ASTNode ast,
AliasDecider aliasDecider) |
void |
addToHaving(org.apache.hadoop.hive.ql.parse.ASTNode ast) |
void |
copyASTs(CubeQueryContext cubeql) |
boolean |
equals(Object obj) |
AbstractCubeTable |
getBaseTable()
Get base table of the candidate table
|
Collection<String> |
getColumns()
Get columns of candidate table
|
List<Integer> |
getDimFieldIndices() |
String |
getFromString() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getGroupByAST() |
String |
getGroupByString() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getHavingAST() |
String |
getHavingString() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getJoinAST() |
Integer |
getLimitValue() |
String |
getName()
Get name of the candidate table
|
int |
getNumQueriedParts() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getOrderByAST() |
String |
getOrderByString() |
Set<FactPartition> |
getPartsQueried()
Get partitions queried
|
Map<TimeRange,Map<String,LinkedHashSet<FactPartition>>> |
getRangeToStoragePartMap() |
Map<TimeRange,Map<String,String>> |
getRangeToStorageWhereMap() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getSelectAST() |
List<Integer> |
getSelectIndices() |
String |
getSelectString() |
String |
getStorageString(String alias)
Get storage string of the base table alias passed
|
Set<String> |
getStorageTables()
Get storage tables corresponding to this candidate
|
org.apache.hadoop.hive.ql.parse.ASTNode |
getStorageWhereClause(String storageTable) |
String |
getStorageWhereString(String storageTable) |
Map<String,org.apache.hadoop.hive.ql.parse.ASTNode> |
getStorgeWhereClauseMap() |
Map<String,String> |
getStorgeWhereStringMap() |
CubeFactTable |
getTable()
Get candidate table
|
Set<String> |
getTimePartCols(CubeQueryContext query) |
org.apache.hadoop.hive.ql.parse.ASTNode |
getWhereAST() |
String |
getWhereString() |
int |
hashCode() |
boolean |
isExpressionAnswerable(org.apache.hadoop.hive.ql.parse.ASTNode node,
CubeQueryContext context) |
boolean |
isValidForTimeRange(TimeRange timeRange) |
void |
setGroupByAST(org.apache.hadoop.hive.ql.parse.ASTNode groupByAST) |
void |
setHavingAST(org.apache.hadoop.hive.ql.parse.ASTNode havingAST) |
void |
setJoinAST(org.apache.hadoop.hive.ql.parse.ASTNode joinAST) |
void |
setLimitValue(Integer limitValue) |
void |
setOrderByAST(org.apache.hadoop.hive.ql.parse.ASTNode orderByAST) |
void |
setSelectAST(org.apache.hadoop.hive.ql.parse.ASTNode selectAST) |
void |
setStorageTables(Set<String> storageTables) |
void |
setWhereAST(org.apache.hadoop.hive.ql.parse.ASTNode whereAST) |
String |
toString() |
void |
updateASTs(CubeQueryContext cubeql)
Update the ASTs to include only the fields queried from this fact, in all the expressions
|
void |
updateFromString(CubeQueryContext query,
Set<Dimension> queryDims,
Map<Dimension,CandidateDim> dimsToQuery) |
public Collection<String> getColumns()
CandidateTable
getColumns
in interface CandidateTable
public boolean isValidForTimeRange(TimeRange timeRange)
public void addToHaving(org.apache.hadoop.hive.ql.parse.ASTNode ast)
public String addAndGetAliasFromSelect(org.apache.hadoop.hive.ql.parse.ASTNode ast, AliasDecider aliasDecider)
public void copyASTs(CubeQueryContext cubeql) throws LensException
LensException
public org.apache.hadoop.hive.ql.parse.ASTNode getStorageWhereClause(String storageTable)
public boolean isExpressionAnswerable(org.apache.hadoop.hive.ql.parse.ASTNode node, CubeQueryContext context) throws LensException
LensException
public void updateASTs(CubeQueryContext cubeql) throws LensException
cubeql
- LensException
public String getStorageString(String alias)
CandidateTable
getStorageString
in interface CandidateTable
public AbstractCubeTable getBaseTable()
CandidateTable
getBaseTable
in interface CandidateTable
public CubeFactTable getTable()
CandidateTable
getTable
in interface CandidateTable
public String getName()
CandidateTable
getName
in interface CandidateTable
public String getSelectString()
getSelectString
in interface QueryAST
public String getWhereString()
getWhereString
in interface QueryAST
public String getHavingString()
getHavingString
in interface QueryAST
public String getOrderByString()
getOrderByString
in interface QueryAST
public String getGroupByString()
getGroupByString
in interface QueryAST
public Set<String> getTimePartCols(CubeQueryContext query) throws LensException
LensException
public void updateFromString(CubeQueryContext query, Set<Dimension> queryDims, Map<Dimension,CandidateDim> dimsToQuery) throws LensException
LensException
@Generated(value="lombok") public Set<String> getStorageTables()
CandidateTable
getStorageTables
in interface CandidateTable
@Generated(value="lombok") public int getNumQueriedParts()
@Generated(value="lombok") public Set<FactPartition> getPartsQueried()
CandidateTable
getPartsQueried
in interface CandidateTable
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getSelectAST()
getSelectAST
in interface QueryAST
@Generated(value="lombok") public void setSelectAST(org.apache.hadoop.hive.ql.parse.ASTNode selectAST)
setSelectAST
in interface QueryAST
selectAST
- the selectAST to set@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getWhereAST()
getWhereAST
in interface QueryAST
@Generated(value="lombok") public void setWhereAST(org.apache.hadoop.hive.ql.parse.ASTNode whereAST)
setWhereAST
in interface QueryAST
whereAST
- the whereAST to set@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getGroupByAST()
getGroupByAST
in interface QueryAST
@Generated(value="lombok") public void setGroupByAST(org.apache.hadoop.hive.ql.parse.ASTNode groupByAST)
setGroupByAST
in interface QueryAST
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getHavingAST()
getHavingAST
in interface QueryAST
@Generated(value="lombok") public void setHavingAST(org.apache.hadoop.hive.ql.parse.ASTNode havingAST)
setHavingAST
in interface QueryAST
havingAST
- the havingAST to set@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getJoinAST()
getJoinAST
in interface QueryAST
@Generated(value="lombok") public void setJoinAST(org.apache.hadoop.hive.ql.parse.ASTNode joinAST)
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getOrderByAST()
getOrderByAST
in interface QueryAST
@Generated(value="lombok") public void setOrderByAST(org.apache.hadoop.hive.ql.parse.ASTNode orderByAST)
setOrderByAST
in interface QueryAST
@Generated(value="lombok") public Integer getLimitValue()
getLimitValue
in interface QueryAST
@Generated(value="lombok") public void setLimitValue(Integer limitValue)
setLimitValue
in interface QueryAST
@Generated(value="lombok") public String getFromString()
getFromString
in interface QueryAST
@Generated(value="lombok") public Map<String,org.apache.hadoop.hive.ql.parse.ASTNode> getStorgeWhereClauseMap()
@Generated(value="lombok") public Map<String,String> getStorgeWhereStringMap()
@Generated(value="lombok") public Map<TimeRange,Map<String,LinkedHashSet<FactPartition>>> getRangeToStoragePartMap()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.