| Modifier and Type | Class and Description |
|---|---|
| private static class | TableFilter.
A visitor that maps columns. |
| public static interface | TableFilter.
A visitor for table filters. |
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private String | |
| private static final int | |
| private LinkedHashMap | commonJoinColumns
Map of common join columns, used for NATURAL joins and USING clause of other joins. |
| private TableFilter | |
| private ArrayList | |
| private Row | |
| private SearchRow | |
| private final IndexCursor | cursor
The filter used to walk through the index. |
| private LinkedHashMap | derivedColumnMap
Map of derived column names. |
| private boolean | |
| private Expression | filterCondition
Additional conditions that can't be used for index lookup, but for row filter for this table (ID=ID, NAME LIKE '%X%') |
| private static final int | |
| private boolean | |
| private Expression | |
| private final int | |
| private Index | |
| private final ArrayList | indexConditions
The index conditions used for direct index lookup (start or end). |
| private final IndexHints | |
| private static final TableFilter. | JOI_VISITOR
A visitor that sets joinOuterIndirect to true. |
| private TableFilter | join
The joined table (if there is one). |
| private Expression | joinCondition
The complete join condition. |
| private boolean | joinOuter
Whether this is an outer join. |
| protected boolean | joinOuterIndirect
Whether this is a direct or indirect (nested) outer join |
| private int[] | |
| private TableFilter | nestedJoin
The nested joined table (if there is one). |
| private static final int | |
| public static final Comparator | ORDER_IN_FROM_COMPARATOR
Comparator that uses order in FROM clause as a sort key. |
| private final int | |
| private int | |
| private final Select | |
| private SessionLocal | |
| private int | |
| private final Table | |
| private boolean | used
Indicates that this filter is used in the plan. |
| Access | Constructor and Description |
|---|---|
| public | TableFilter(SessionLocal
the session session, Table the table from where to read data table, String the alias name alias, boolean true if rights are already checked rightsChecked, Select the select statement select, int original order number (index) of this table filter in orderInFrom, IndexHints the index hints to be used by the query planner indexHints)Create a new table filter object. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addCommonJoinColumns(Column
the column on the left side leftColumn, Column the column to use instead, may be the same as column on the
left side replacementColumn, TableFilter the table filter for replacement columns replacementFilter)Add a column to the common join column list for a left table filter. |
| public void | addCommonJoinColumnToExclude(Column
the column to exclude columnToExclude)Add an excluded column to the common join column list. |
| public void | |
| public void | addFilterCondition(Expression
the condition condition, boolean if this is in fact a join condition isJoin)Add a filter condition. |
| public void | |
| public void | addJoin(TableFilter
the joined table filter filter, boolean if this is an outer join outer, Expression the join condition on)Add a joined table. |
| private void | |
| public void | |
| public Column | findColumn(String
the column name, must be a derived name if this column
resolver has a derived column list name)Implements org. Get the column with the specified name. |
| public Row | |
| public PlanItem | Returns: the best plan itemthe session s, TableFilter[] all joined table filters filters, int the current table filter index filter, AllColumnsForPlan the set of all columns allColumnsSet)Get the best plan item (index, cost) to use for the current join order. |
| public Column | |
| public String | getColumnName(Column
column column)Overrides default org. Get the name of the specified column. |
| public Column[] | |
| public LinkedHashMap | |
| public TableFilter | Returns: common join columns table filter, ornullReturns common join columns table filter. |
| private Value | |
| public Expression | |
| public Index | |
| public ArrayList | |
| public IndexCursor | |
| public IndexHints | |
| public TableFilter | |
| public Expression | |
| public int[] | |
| public TableFilter | |
| public int | Returns: the index (0, 1, 2,...)Get the order number (index) of this table filter in the "from" clause of the query. |
| public StringBuilder | Returns: the specified builderstring builder to append to builder, boolean if this is a joined table isJoin, int formatting flags sqlFlags)Get the query execution plan text to use for this table filter and append it to the specified builder. |
| public Column | getRowIdColumn()
Overrides default org. Get the row id pseudo column, if there is one. |
| public String | getSchemaName()
Overrides default org. Get the schema name or null. |
| public Select | |
| public SessionLocal | |
| public Column[] | Returns: the system columnsOverrides default org. Get the system columns that this table understands. |
| public Table | |
| public String | Returns: the alias nameOverrides default org. Get the table alias name. |
| public TableFilter | |
| public Value | getValue(Column
the column column)Implements org. Get the value for the given column. |
| public boolean | hasDerivedColumnList()
Overrides default org. Returns whether this column resolver has a derived column list. |
| public int | |
| public boolean | Returns: whether there are IN(...) comparisonsAre there any index conditions that involve IN(...). |
| public boolean | Returns: true if this is an excluded common join columnthe column to check c)Check if the given column is an excluded common join column. |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if it isWhether this is indirectly an outer joined table (nested within an inner join). |
| public boolean | Returns: whether this is a table filter with implicit DUAL tableReturns whether this is a table filter with implicit DUAL table for a SELECT without a FROM clause. |
| public boolean | |
| pack-priv boolean | Returns: true if yesthe condition (null for no condition) condition)Whether the current value of the condition is true, or there is no condition. |
| public boolean | |
| public void | |
| public void | mapColumns(ColumnResolver
the resolver resolver, int the subquery level (0 is the top level query, 1 is the first
subquery level) level, boolean whether this method was called from the outer query outer)Map the columns to the given column resolver. |
| public boolean | |
| pack-priv void | |
| public void | |
| public void | |
| public void | |
| public void | |
| pack-priv void | |
| public void | |
| public void | |
| public void | |
| public void | setDerivedColumns(ArrayList<String>
names of derived columns derivedColumnNames)Set derived column list. |
| public void | setEvaluatable(TableFilter
the table filter filter, boolean the new flag b)Update the filter and join conditions of this and all joined tables with the information that the given table filter and all nested filter can now return rows or not. |
| public void | |
| public void | |
| public void | |
| public void | |
| protected void | |
| public void | |
| private void | |
| public void | |
| public void | |
| public String | |
| public void | visit(TableFilter.
the visitor visitorVisit this and all joined or nested table filters. |
| AFTER_LAST | back to summary |
|---|---|
| private static final int AFTER_LAST | |
| alias | back to summary |
|---|---|
| private String alias | |
| BEFORE_FIRST | back to summary |
|---|---|
| private static final int BEFORE_FIRST | |
| commonJoinColumns | back to summary |
|---|---|
| private LinkedHashMap<Column, Column> commonJoinColumns Map of common join columns, used for NATURAL joins and USING clause of other joins. This map preserves original order of the columns. | |
| commonJoinColumnsFilter | back to summary |
|---|---|
| private TableFilter commonJoinColumnsFilter | |
| commonJoinColumnsToExclude | back to summary |
|---|---|
| private ArrayList<Column> commonJoinColumnsToExclude | |
| current | back to summary |
|---|---|
| private Row current | |
| currentSearchRow | back to summary |
|---|---|
| private SearchRow currentSearchRow | |
| cursor | back to summary |
|---|---|
| private final IndexCursor cursor The filter used to walk through the index. | |
| derivedColumnMap | back to summary |
|---|---|
| private LinkedHashMap<Column, String> derivedColumnMap Map of derived column names. This map preserves original order of the columns. | |
| evaluatable | back to summary |
|---|---|
| private boolean evaluatable | |
| filterCondition | back to summary |
|---|---|
| private Expression filterCondition Additional conditions that can't be used for index lookup, but for row filter for this table (ID=ID, NAME LIKE '%X%') | |
| FOUND | back to summary |
|---|---|
| private static final int FOUND | |
| foundOne | back to summary |
|---|---|
| private boolean foundOne | |
| fullCondition | back to summary |
|---|---|
| private Expression fullCondition | |
| hashCode | back to summary |
|---|---|
| private final int hashCode | |
| index | back to summary |
|---|---|
| private Index index | |
| indexConditions | back to summary |
|---|---|
| private final ArrayList<IndexCondition> indexConditions The index conditions used for direct index lookup (start or end). | |
| indexHints | back to summary |
|---|---|
| private final IndexHints indexHints | |
| JOI_VISITOR | back to summary |
|---|---|
| private static final TableFilter. A visitor that sets joinOuterIndirect to true. | |
| join | back to summary |
|---|---|
| private TableFilter join The joined table (if there is one). | |
| joinCondition | back to summary |
|---|---|
| private Expression joinCondition The complete join condition. | |
| joinOuter | back to summary |
|---|---|
| private boolean joinOuter Whether this is an outer join. | |
| joinOuterIndirect | back to summary |
|---|---|
| protected boolean joinOuterIndirect Whether this is a direct or indirect (nested) outer join | |
| masks | back to summary |
|---|---|
| private int[] masks | |
| nestedJoin | back to summary |
|---|---|
| private TableFilter nestedJoin The nested joined table (if there is one). | |
| NULL_ROW | back to summary |
|---|---|
| private static final int NULL_ROW | |
| ORDER_IN_FROM_COMPARATOR | back to summary |
|---|---|
| public static final Comparator<TableFilter> ORDER_IN_FROM_COMPARATOR Comparator that uses order in FROM clause as a sort key. | |
| orderInFrom | back to summary |
|---|---|
| private final int orderInFrom | |
| scanCount | back to summary |
|---|---|
| private int scanCount | |
| select | back to summary |
|---|---|
| private final Select select | |
| session | back to summary |
|---|---|
| private SessionLocal session | |
| state | back to summary |
|---|---|
| private int state | |
| table | back to summary |
|---|---|
| private final Table table | |
| used | back to summary |
|---|---|
| private boolean used Indicates that this filter is used in the plan. | |
| TableFilter | back to summary |
|---|---|
| public TableFilter(SessionLocal session, Table table, String alias, boolean rightsChecked, Select select, int orderInFrom, IndexHints indexHints) Create a new table filter object.
| |
| addCommonJoinColumns | back to summary |
|---|---|
| public void addCommonJoinColumns(Column leftColumn, Column replacementColumn, TableFilter replacementFilter) Add a column to the common join column list for a left table filter.
| |
| addCommonJoinColumnToExclude | back to summary |
|---|---|
| public void addCommonJoinColumnToExclude(Column columnToExclude) Add an excluded column to the common join column list.
| |
| addFilter | back to summary |
|---|---|
| public void addFilter(Expression on) Add the join condition.
| |
| addFilterCondition | back to summary |
|---|---|
| public void addFilterCondition(Expression condition, boolean isJoin) Add a filter condition.
| |
| addIndexCondition | back to summary |
|---|---|
| public void addIndexCondition(IndexCondition condition) Add an index condition.
| |
| addJoin | back to summary |
|---|---|
| public void addJoin(TableFilter filter, boolean outer, Expression on) Add a joined table.
| |
| checkTimeout | back to summary |
|---|---|
| private void checkTimeout() | |
| createIndexConditions | back to summary |
|---|---|
| public void createIndexConditions() Create the index conditions for this filter if needed. | |
| findColumn | back to summary |
|---|---|
| public Column findColumn(String name) Implements org. Doc from org. Get the column with the specified name. | |
| get | back to summary |
|---|---|
| public Row get() Get the current row.
| |
| getBestPlanItem | back to summary |
|---|---|
| public PlanItem getBestPlanItem(SessionLocal s, TableFilter[] filters, int filter, AllColumnsForPlan allColumnsSet) Get the best plan item (index, cost) to use for the current join order.
| |
| getColumn | back to summary |
|---|---|
| public Column getColumn(String columnName, boolean ifExists) Get the column with the given name.
| |
| getColumnName | back to summary |
|---|---|
| public String getColumnName(Column column) Overrides default org. Doc from org. Get the name of the specified column. | |
| getColumns | back to summary |
|---|---|
| public Column[] getColumns() Implements org. Doc from org. Get the column list. | |
| getCommonJoinColumns | back to summary |
|---|---|
| public LinkedHashMap Returns common join columns map.
| |
| getCommonJoinColumnsFilter | back to summary |
|---|---|
| public TableFilter getCommonJoinColumnsFilter() Returns common join columns table filter.
| |
| getDelegatedValue | back to summary |
|---|---|
| private Value getDelegatedValue(Column column) | |
| getFilterCondition | back to summary |
|---|---|
| public Expression getFilterCondition() | |
| getIndex | back to summary |
|---|---|
| public Index getIndex() | |
| getIndexConditions | back to summary |
|---|---|
| public ArrayList | |
| getIndexCursor | back to summary |
|---|---|
| public IndexCursor getIndexCursor() | |
| getIndexHints | back to summary |
|---|---|
| public IndexHints getIndexHints() | |
| getJoin | back to summary |
|---|---|
| public TableFilter getJoin() | |
| getJoinCondition | back to summary |
|---|---|
| public Expression getJoinCondition() | |
| getMasks | back to summary |
|---|---|
| public int[] getMasks() | |
| getNestedJoin | back to summary |
|---|---|
| public TableFilter getNestedJoin() | |
| getOrderInFrom | back to summary |
|---|---|
| public int getOrderInFrom() Get the order number (index) of this table filter in the "from" clause of the query.
| |
| getPlanSQL | back to summary |
|---|---|
| public StringBuilder getPlanSQL(StringBuilder builder, boolean isJoin, int sqlFlags) Get the query execution plan text to use for this table filter and append it to the specified builder.
| |
| getRowIdColumn | back to summary |
|---|---|
| public Column getRowIdColumn() Overrides default org. Doc from org. Get the row id pseudo column, if there is one. | |
| getSchemaName | back to summary |
|---|---|
| public String getSchemaName() Overrides default org. Doc from org. Get the schema name or null. | |
| getSelect | back to summary |
|---|---|
| public Select getSelect() Overrides default org. Doc from org. Get the select statement. | |
| getSession | back to summary |
|---|---|
| public SessionLocal getSession() | |
| getSystemColumns | back to summary |
|---|---|
| public Column[] getSystemColumns() Overrides default org. Get the system columns that this table understands. This is used for compatibility with other databases. The columns are only returned if the current mode supports system columns. | |
| getTable | back to summary |
|---|---|
| public Table getTable() | |
| getTableAlias | back to summary |
|---|---|
| public String getTableAlias() Overrides default org. Get the table alias name. If no alias is specified, the table name is returned. | |
| getTableFilter | back to summary |
|---|---|
| public TableFilter getTableFilter() Overrides default org. Doc from org. Get the table filter.
| |
| getValue | back to summary |
|---|---|
| public Value getValue(Column column) Implements org. Doc from org. Get the value for the given column. | |
| hasDerivedColumnList | back to summary |
|---|---|
| public boolean hasDerivedColumnList() Overrides default org. Doc from org. Returns whether this column resolver has a derived column list.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasInComparisons | back to summary |
|---|---|
| public boolean hasInComparisons() Are there any index conditions that involve IN(...).
| |
| isCommonJoinColumnToExclude | back to summary |
|---|---|
| public boolean isCommonJoinColumnToExclude(Column c) Check if the given column is an excluded common join column.
| |
| isEvaluatable | back to summary |
|---|---|
| public boolean isEvaluatable() | |
| isJoinOuter | back to summary |
|---|---|
| public boolean isJoinOuter() Whether this is an outer joined table.
| |
| isJoinOuterIndirect | back to summary |
|---|---|
| public boolean isJoinOuterIndirect() Whether this is indirectly an outer joined table (nested within an inner join).
| |
| isNoFromClauseFilter | back to summary |
|---|---|
| public boolean isNoFromClauseFilter() Returns whether this is a table filter with implicit DUAL table for a SELECT without a FROM clause.
| |
| isNullRow | back to summary |
|---|---|
| public boolean isNullRow() | |
| isOk | back to summary |
|---|---|
| pack-priv boolean isOk(Expression condition) Whether the current value of the condition is true, or there is no condition.
| |
| isUsed | back to summary |
|---|---|
| public boolean isUsed() | |
| lock | back to summary |
|---|---|
| public void lock(SessionLocal s) Lock the table. This will also lock joined tables.
| |
| mapColumns | back to summary |
|---|---|
| public void mapColumns(ColumnResolver resolver, int level, boolean outer) Map the columns to the given column resolver.
| |
| next | back to summary |
|---|---|
| public boolean next() Check if there are more rows to read.
| |
| optimizeFullCondition | back to summary |
|---|---|
| pack-priv void optimizeFullCondition() Optimize the full condition. This will add the full condition to the filter condition. | |
| prepare | back to summary |
|---|---|
| public void prepare() Prepare reading rows. This method will remove all index conditions that can not be used, and optimize the conditions. | |
| removeFilterCondition | back to summary |
|---|---|
| public void removeFilterCondition() Remove the filter condition. | |
| removeJoin | back to summary |
|---|---|
| public void removeJoin() Remove the joined table | |
| removeJoinCondition | back to summary |
|---|---|
| public void removeJoinCondition() Remove the join condition. | |
| removeUnusableIndexConditions | back to summary |
|---|---|
| pack-priv void removeUnusableIndexConditions() Remove all index conditions that are not used by the current index. | |
| reset | back to summary |
|---|---|
| public void reset() Reset to the current position. | |
| set | back to summary |
|---|---|
| public void set(Row current) Set the current row.
| |
| setAlias | back to summary |
|---|---|
| public void setAlias(String alias) | |
| setDerivedColumns | back to summary |
|---|---|
| public void setDerivedColumns(ArrayList<String> derivedColumnNames) Set derived column list. | |
| setEvaluatable | back to summary |
|---|---|
| public void setEvaluatable(TableFilter filter, boolean b) Update the filter and join conditions of this and all joined tables with the information that the given table filter and all nested filter can now return rows or not.
| |
| setEvaluatable | back to summary |
|---|---|
| public void setEvaluatable(boolean evaluatable) | |
| setFullCondition | back to summary |
|---|---|
| public void setFullCondition(Expression condition) | |
| setIndex | back to summary |
|---|---|
| public void setIndex(Index index, boolean reverse) | |
| setNestedJoin | back to summary |
|---|---|
| public void setNestedJoin(TableFilter filter) Set a nested joined table.
| |
| setNullRow | back to summary |
|---|---|
| protected void setNullRow() Set the state of this and all nested tables to the NULL row. | |
| setPlanItem | back to summary |
|---|---|
| public void setPlanItem(PlanItem item) Set what plan item (index, cost, masks) to use.
| |
| setScanIndexes | back to summary |
|---|---|
| private void setScanIndexes() Set all missing indexes to scan indexes recursively. | |
| setUsed | back to summary |
|---|---|
| public void setUsed(boolean used) | |
| startQuery | back to summary |
|---|---|
| public void startQuery(SessionLocal s) Start the query. This will reset the scan counts.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| visit | back to summary |
|---|---|
| public void visit(TableFilter. Visit this and all joined or nested table filters.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Expression |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(TableFilter
the filter f)Implements org. This method is called for each nested or joined table filter. |
| on | back to summary |
|---|---|
| private final Expression on | |
| MapColumnsVisitor | back to summary |
|---|---|
| pack-priv MapColumnsVisitor(Expression on) | |
| accept | back to summary |
|---|---|
| public void accept(TableFilter f) Implements org. Doc from org. This method is called for each nested or joined table filter.
| |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| accept | back to summary |
|---|---|
| public void accept(TableFilter f) This method is called for each nested or joined table filter.
| |