|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.lens.server.api.driver.DriverQueryPlan
public abstract class DriverQueryPlan
The Class DriverQueryPlan.
| Nested Class Summary | |
|---|---|
static class |
DriverQueryPlan.ExecMode
The Enum ExecMode. |
static class |
DriverQueryPlan.ScanMode
The Enum ScanMode. |
| Field Summary | |
|---|---|
protected DriverQueryPlan.ExecMode |
execMode
The exec mode. |
protected Double |
filterWeight
The filter weight. |
protected Double |
gbyWeight
The gby weight. |
protected QueryPrepareHandle |
handle
The handle. |
protected boolean |
hasSubQuery
The has sub query. |
protected Double |
havingWeight
The having weight. |
protected Double |
joinWeight
The join weight. |
protected int |
numAggrExprs
The num aggr exprs. |
protected int |
numFilters
The num filters. |
protected int |
numGbys
The num gbys. |
protected int |
numHaving
The num having. |
protected int |
numJoins
The num joins. |
protected int |
numObys
The num obys. |
protected int |
numSelDi
The num sel di. |
protected int |
numSels
The num sels. |
protected Double |
obyWeight
The oby weight. |
protected String |
resultDestination
The result destination. |
protected DriverQueryPlan.ScanMode |
scanMode
The scan mode. |
protected Double |
selectWeight
The select weight. |
protected List<String> |
tablesQueried
The tables queried. |
protected Map<String,Double> |
tableWeights
The table weights. |
| Constructor Summary | |
|---|---|
DriverQueryPlan()
|
|
| Method Summary | |
|---|---|
protected void |
addTablesQueries(String table)
Set the list of table names to be queried. |
abstract QueryCost |
getCost()
Get the cost associated with the plan |
DriverQueryPlan.ExecMode |
getExecMode()
Get the exec mode |
Double |
getFilterWeight()
Set the weight associated with filter expressions. |
Double |
getGbyWeight()
Set the weight associated with group by expressions. |
QueryHandle |
getHandle()
Deprecated. |
Double |
getHavingWeight()
Set the weight associated with having expressions. |
Double |
getJoinWeight()
Get the weight associated with joins |
int |
getNumAggreagateExprs()
|
int |
getNumFilters()
Get the number of filters in query |
int |
getNumGbys()
Get the number of group by expressions on query |
int |
getNumHaving()
Get the number of having expressions on query |
int |
getNumJoins()
Get number of joins in the query |
int |
getNumOrderBys()
Get the number of order by expressions on query |
int |
getNumSelDistincts()
Get the number distinct select expressions |
int |
getNumSels()
Get the number of select expressions |
Double |
getObyWeight()
Get the weight associated with order by expressions. |
Map<String,List<String>> |
getPartitions()
Get list of partitions queried for each table |
abstract String |
getPlan()
Get the query plan |
QueryPrepareHandle |
getPrepareHandle()
|
String |
getResultDestination()
Get the result destination |
DriverQueryPlan.ScanMode |
getScanMode()
Get the scan mode. |
Double |
getSelectWeight()
Get the weight associated with select expressions. |
List<String> |
getTablesQueried()
Get the list of tables to be queried |
Double |
getTableWeight(String tableName)
Get the weight of the table. |
Map<String,Double> |
getTableWeights()
Get the table weights |
boolean |
hasSubQuery()
Get if the query has a subquery or not. |
protected void |
setExecMode(DriverQueryPlan.ExecMode execMode)
Set the exec mode |
protected void |
setFilterWeight(Double filterWeight)
Set the weight associated with filter expressions. |
protected void |
setGbyWeight(Double gbyWeight)
Set the weight associated with group by expressions. |
protected void |
setHasSubQuery()
Set if query has subquery. |
protected void |
setHavingWeight(Double havingWeight)
Set the weight associated with having expressions. |
protected void |
setJoinWeight(Double joinWeight)
Set the weight associated with joins |
protected void |
setNumFilters(int numFilters)
Set the number of filters in query |
protected void |
setNumGbys(int numGbys)
Set the number of groupbys |
protected void |
setNumHaving(int numHaving)
Set the number of having expressions on query |
protected void |
setNumJoins(int numJoins)
Set the number of join expressions on query |
protected void |
setNumOrderBys(int numObys)
Set the number of order by expressions on query |
protected void |
setNumSelDistincts(int numSelDi)
Set the number of distinct select expressions |
protected void |
setNumSels(int numSels)
Set the number of select expressions |
protected void |
setObyWeight(Double obyWeight)
Set the weight associated with order by expressions. |
void |
setPrepareHandle(QueryPrepareHandle handle)
|
protected void |
setResultDestination(String resultDestination)
Set string representation of the destination |
protected void |
setScanMode(DriverQueryPlan.ScanMode scanMode)
Set the scan mode |
protected void |
setSelectWeight(Double selectWeight)
Set the weight associated with select expressions. |
protected void |
setTableWeight(String tableName,
Double tableWeight)
Set the weight of the table. |
QueryPlan |
toQueryPlan()
To query plan. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int numJoins
protected int numGbys
protected int numSels
protected int numSelDi
protected int numHaving
protected int numObys
protected int numAggrExprs
protected int numFilters
protected final List<String> tablesQueried
protected boolean hasSubQuery
protected String resultDestination
protected DriverQueryPlan.ExecMode execMode
protected DriverQueryPlan.ScanMode scanMode
protected final Map<String,Double> tableWeights
protected Double joinWeight
protected Double gbyWeight
protected Double filterWeight
protected Double havingWeight
protected Double obyWeight
protected Double selectWeight
protected QueryPrepareHandle handle
| Constructor Detail |
|---|
public DriverQueryPlan()
| Method Detail |
|---|
public abstract String getPlan()
public abstract QueryCost getCost()
public int getNumGbys()
protected void setNumGbys(int numGbys)
numGbys - the numGbys to setpublic int getNumSels()
protected void setNumSels(int numSels)
numSels - the numSels to setpublic int getNumSelDistincts()
protected void setNumSelDistincts(int numSelDi)
numSelDi - the numSelDi to setpublic int getNumJoins()
protected void setNumJoins(int numJoins)
numJoins - the numJoins to setpublic int getNumHaving()
protected void setNumHaving(int numHaving)
numHaving - the numHaving to setpublic int getNumOrderBys()
protected void setNumOrderBys(int numObys)
numObys - the numObys to setpublic List<String> getTablesQueried()
protected void addTablesQueries(String table)
table - the tablepublic int getNumFilters()
protected void setNumFilters(int numFilters)
numFilters - the numFilters to setpublic boolean hasSubQuery()
protected void setHasSubQuery()
public String getResultDestination()
protected void setResultDestination(String resultDestination)
resultDestination - the resultDestination to setpublic Map<String,Double> getTableWeights()
public Double getTableWeight(String tableName)
tableName - the table name
protected void setTableWeight(String tableName,
Double tableWeight)
tableName - The name of the table.tableWeight - Weight of the table being queried.
This should reflect the amount of data being read/scanned from the table, scan costpublic DriverQueryPlan.ExecMode getExecMode()
DriverQueryPlan.ExecModeprotected void setExecMode(DriverQueryPlan.ExecMode execMode)
execMode - the DriverQueryPlan.ExecMode to setpublic DriverQueryPlan.ScanMode getScanMode()
DriverQueryPlan.ScanModeprotected void setScanMode(DriverQueryPlan.ScanMode scanMode)
scanMode - the DriverQueryPlan.ScanMode to setpublic Double getJoinWeight()
protected void setJoinWeight(Double joinWeight)
joinWeight - the joinWeight to setpublic Double getGbyWeight()
protected void setGbyWeight(Double gbyWeight)
gbyWeight - the gbyWeight to setpublic Double getFilterWeight()
protected void setFilterWeight(Double filterWeight)
filterWeight - the filterWeight to setpublic Double getObyWeight()
protected void setObyWeight(Double obyWeight)
obyWeight - the obyWeight to setpublic Double getHavingWeight()
protected void setHavingWeight(Double havingWeight)
havingWeight - the havingWeight to setpublic Double getSelectWeight()
protected void setSelectWeight(Double selectWeight)
selectWeight - the selectWeight to setpublic QueryHandle getHandle()
public QueryPrepareHandle getPrepareHandle()
public void setPrepareHandle(QueryPrepareHandle handle)
handle - the handle to setpublic int getNumAggreagateExprs()
public Map<String,List<String>> getPartitions()
public QueryPlan toQueryPlan()
throws UnsupportedEncodingException
UnsupportedEncodingException - the unsupported encoding exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||