Constructor and Description |
---|
CubeQueryContext(org.apache.hadoop.hive.ql.parse.ASTNode ast,
org.apache.hadoop.hive.ql.parse.QB qb,
org.apache.hadoop.conf.Configuration queryConf,
org.apache.hadoop.hive.conf.HiveConf metastoreConf) |
Modifier and Type | Method and Description |
---|---|
void |
addColumnsQueried(Map<String,Set<String>> tblAliasToColumns)
Add given map of tblAliasToColumns.
|
void |
addColumnsQueried(String tblAlias,
String column)
Add given table alias and column
|
void |
addDimPruningMsgs(Dimension dim,
CubeDimensionTable dimtable,
CandidateTablePruneCause msg) |
String |
getAliasForTableName(Named named) |
String |
getAliasForTableName(String tableName) |
org.apache.hadoop.hive.ql.parse.ASTNode |
getAst() |
AutoJoinContext |
getAutoJoinCtx() |
Map<Dimension,Set<CandidateDim>> |
getCandidateDims() |
Map<Dimension,Set<CandidateDim>> |
getCandidateDimTables() |
Set<Candidate> |
getCandidates()
This is the set of working Candidates that gets updated during different phases of
query resolution.
|
Map<String,String> |
getColToTableAlias() |
Set<String> |
getColumnsQueried(String tblAlias)
Get columns queried by tblAlias
|
org.apache.hadoop.conf.Configuration |
getConf() |
CubeInterface |
getCube() |
AbstractCubeTable |
getCubeTableForAlias(String alias) |
Map<String,AbstractCubeTable> |
getCubeTbls() |
org.apache.lens.cube.parse.DenormalizationResolver.DenormalizationContext |
getDeNormCtx()
Get denormalization context
|
Set<Dimension> |
getDimensions() |
Map<Dimension,PruneCauses<CubeDimensionTable>> |
getDimPruningMsgs() |
Map<org.apache.lens.cube.parse.CubeQueryContext.QueriedExprColumn,Set<Aliased<Dimension>>> |
getExprColToDim() |
org.apache.lens.cube.parse.ExpressionResolver.ExpressionResolverContext |
getExprCtx() |
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() |
Map<String,JoinChain> |
getJoinchains() |
Map<org.apache.hadoop.hive.ql.parse.QBJoinTree,String> |
getJoinConds() |
Integer |
getLimitValue() |
CubeMetastoreClient |
getMetastoreClient() |
Set<Dimension> |
getNonChainedDimensions() |
Map<Aliased<Dimension>,org.apache.lens.cube.parse.CubeQueryContext.OptionalDimCtx> |
getOptionalDimensionMap() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getOrderByAST() |
String |
getOrderByString() |
Candidate |
getPickedCandidate() |
Collection<CandidateDim> |
getPickedDimTables() |
org.apache.hadoop.hive.ql.parse.QB |
getQb() |
Set<String> |
getQueriedExprs() |
Set<String> |
getQueriedExprsWithMeasures() |
Set<String> |
getQueriedMsrs() |
List<org.apache.lens.cube.parse.QueriedPhraseContext> |
getQueriedPhrases() |
AbstractCubeTable |
getQueriedTable(String alias) |
QueryWriterContext |
getQueryWriterContext() |
QueryWriterContext |
getQueryWriterContext(Candidate cand,
Map<Dimension,CandidateDim> dimsToQuery) |
TimeRangeWriter |
getRangeWriter() |
Map<String,Set<Aliased<Dimension>>> |
getRefColToDim() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getSelectAST() |
List<org.apache.lens.cube.parse.SelectPhraseContext> |
getSelectPhrases() |
String |
getSelectString() |
PruneCauses<Candidate> |
getStoragePruningMsgs() |
Map<String,Set<String>> |
getTblAliasToColumns()
Get tblAlias to column
|
List<TimeRange> |
getTimeRanges() |
org.apache.hadoop.hive.ql.parse.ASTNode |
getWhereAST() |
String |
getWhereString() |
void |
print() |
void |
setAutoJoinCtx(AutoJoinContext autoJoinCtx) |
void |
setDeNormCtx(org.apache.lens.cube.parse.DenormalizationResolver.DenormalizationContext deNormCtx)
Set denormalization context
|
void |
setExprCtx(org.apache.lens.cube.parse.ExpressionResolver.ExpressionResolverContext exprCtx) |
void |
setFromString(String fromString) |
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 node) |
void |
setLimitValue(Integer value) |
void |
setOrderByAST(org.apache.hadoop.hive.ql.parse.ASTNode orderByAST) |
void |
setSelectAST(org.apache.hadoop.hive.ql.parse.ASTNode selectAST) |
void |
setWhereAST(org.apache.hadoop.hive.ql.parse.ASTNode whereAST) |
void |
setWhereString(String whereString) |
boolean |
shouldReplaceTimeDimWithPart() |
org.apache.hadoop.hive.ql.parse.ASTNode |
toAST(org.apache.hadoop.hive.ql.Context ctx) |
String |
toHQL() |
public static final String NOW
public CubeQueryContext(org.apache.hadoop.hive.ql.parse.ASTNode ast, org.apache.hadoop.hive.ql.parse.QB qb, org.apache.hadoop.conf.Configuration queryConf, org.apache.hadoop.hive.conf.HiveConf metastoreConf) throws LensException
LensException
public AbstractCubeTable getCubeTableForAlias(String alias)
public Map<Dimension,Set<CandidateDim>> getCandidateDimTables()
public void addDimPruningMsgs(Dimension dim, CubeDimensionTable dimtable, CandidateTablePruneCause msg)
public void print()
public String getSelectString()
getSelectString
in interface QueryAST
public void setWhereString(String whereString)
setWhereString
in interface QueryAST
public String getWhereString()
getWhereString
in interface QueryAST
public String getGroupByString()
getGroupByString
in interface QueryAST
public String getHavingString()
getHavingString
in interface QueryAST
public org.apache.hadoop.hive.ql.parse.ASTNode getJoinAST()
getJoinAST
in interface QueryAST
public void setJoinAST(org.apache.hadoop.hive.ql.parse.ASTNode node)
setJoinAST
in interface QueryAST
public String getOrderByString()
getOrderByString
in interface QueryAST
public Integer getLimitValue()
getLimitValue
in interface QueryAST
public void setLimitValue(Integer value)
setLimitValue
in interface QueryAST
public QueryWriterContext getQueryWriterContext(Candidate cand, Map<Dimension,CandidateDim> dimsToQuery) throws LensException
LensException
public String toHQL() throws LensException
LensException
public org.apache.hadoop.hive.ql.parse.ASTNode toAST(org.apache.hadoop.hive.ql.Context ctx) throws LensException
LensException
public AbstractCubeTable getQueriedTable(String alias)
public boolean shouldReplaceTimeDimWithPart()
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.ASTNode getAst()
@Generated(value="lombok") public org.apache.hadoop.hive.ql.parse.QB getQb()
@Generated(value="lombok") public org.apache.hadoop.conf.Configuration getConf()
@Generated(value="lombok") public List<TimeRange> getTimeRanges()
@Generated(value="lombok") public CubeInterface getCube()
@Generated(value="lombok") public Set<Dimension> getDimensions()
@Generated(value="lombok") public Set<Dimension> getNonChainedDimensions()
@Generated(value="lombok") public Map<String,JoinChain> getJoinchains()
@Generated(value="lombok") public Set<String> getQueriedMsrs()
@Generated(value="lombok") public Set<String> getQueriedExprs()
@Generated(value="lombok") public Set<String> getQueriedExprsWithMeasures()
@Generated(value="lombok") public Map<String,String> getColToTableAlias()
@Generated(value="lombok") public Set<Candidate> getCandidates()
ContextRewriter
may add/remove/update Candiadtes in
this working set and from the final set of Candidates single pickedCandidate
is chosen.@Generated(value="lombok") public Map<Aliased<Dimension>,org.apache.lens.cube.parse.CubeQueryContext.OptionalDimCtx> getOptionalDimensionMap()
@Generated(value="lombok") public Map<String,AbstractCubeTable> getCubeTbls()
@Generated(value="lombok") public List<org.apache.lens.cube.parse.SelectPhraseContext> getSelectPhrases()
@Generated(value="lombok") public List<org.apache.lens.cube.parse.QueriedPhraseContext> getQueriedPhrases()
@Generated(value="lombok") public Map<org.apache.hadoop.hive.ql.parse.QBJoinTree,String> getJoinConds()
@Generated(value="lombok") public Map<Dimension,Set<CandidateDim>> getCandidateDims()
@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 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 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 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 CubeMetastoreClient getMetastoreClient()
@Generated(value="lombok") public AutoJoinContext getAutoJoinCtx()
@Generated(value="lombok") public void setAutoJoinCtx(AutoJoinContext autoJoinCtx)
@Generated(value="lombok") public org.apache.lens.cube.parse.ExpressionResolver.ExpressionResolverContext getExprCtx()
@Generated(value="lombok") public void setExprCtx(org.apache.lens.cube.parse.ExpressionResolver.ExpressionResolverContext exprCtx)
@Generated(value="lombok") public org.apache.lens.cube.parse.DenormalizationResolver.DenormalizationContext getDeNormCtx()
@Generated(value="lombok") public void setDeNormCtx(org.apache.lens.cube.parse.DenormalizationResolver.DenormalizationContext deNormCtx)
deNormCtx
- DenormalizationContext@Generated(value="lombok") public PruneCauses<Candidate> getStoragePruningMsgs()
@Generated(value="lombok") public Map<Dimension,PruneCauses<CubeDimensionTable>> getDimPruningMsgs()
@Generated(value="lombok") public void setFromString(String fromString)
setFromString
in interface QueryAST
@Generated(value="lombok") public String getFromString()
getFromString
in interface QueryAST
@Generated(value="lombok") public TimeRangeWriter getRangeWriter()
@Generated(value="lombok") public Map<String,Set<Aliased<Dimension>>> getRefColToDim()
@Generated(value="lombok") public Map<org.apache.lens.cube.parse.CubeQueryContext.QueriedExprColumn,Set<Aliased<Dimension>>> getExprColToDim()
@Generated(value="lombok") public QueryWriterContext getQueryWriterContext()
@Generated(value="lombok") public Candidate getPickedCandidate()
@Generated(value="lombok") public Collection<CandidateDim> getPickedDimTables()
public void addColumnsQueried(String tblAlias, String column)
tblAlias
- Table aliascolumn
- columnpublic void addColumnsQueried(Map<String,Set<String>> tblAliasToColumns)
tblAliasToColumns
- map of tblAliasToColumnspublic Set<String> getColumnsQueried(String tblAlias)
tblAlias
- tbl alias nameCopyright © 2014–2018 Apache Software Foundation. All rights reserved.