public final class ExpressionVisitor
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DECREMENT_QUERY_LEVEL
Decrement query level of all expression columns.
|
static int |
DETERMINISTIC
Does the expression return the same results for the same parameters?
|
static ExpressionVisitor |
DETERMINISTIC_VISITOR
The visitor singleton for the type DETERMINISTIC.
|
static int |
EVALUATABLE
Can the expression be evaluated, that means are all columns set to
'evaluatable'?
|
static ExpressionVisitor |
EVALUATABLE_VISITOR
The visitor singleton for the type EVALUATABLE.
|
static int |
GET_COLUMNS1
Get all referenced columns for the optimiser.
|
static int |
GET_COLUMNS2
Get all referenced columns.
|
static int |
GET_DEPENDENCIES
Request to get the set of dependencies (addDependency).
|
static int |
INDEPENDENT
Is the value independent on unset parameters or on columns of a higher
level query, or sequence values (that means can it be evaluated right
now)?
|
static ExpressionVisitor |
INDEPENDENT_VISITOR
The visitor singleton for the type INDEPENDENT.
|
static int |
NOT_FROM_RESOLVER
Does an expression have no relation to the given table filter
(getResolver)?
|
static int |
OPTIMIZABLE_AGGREGATE
Are all aggregates MIN(column), MAX(column), COUNT(*), MEDIAN(column),
ENVELOPE(count) for the given table (getTable)?
|
static int |
QUERY_COMPARABLE
Can the expression be added to a condition of an outer query.
|
static ExpressionVisitor |
QUERY_COMPARABLE_VISITOR
The visitor singleton for the type QUERY_COMPARABLE.
|
static int |
READONLY
Does the expression have no side effects (change the data)?
|
static ExpressionVisitor |
READONLY_VISITOR
The visitor singleton for the type EVALUATABLE.
|
static int |
SET_MAX_DATA_MODIFICATION_ID
Request to set the latest modification id (addDataModificationId).
|
Modifier and Type | Method and Description |
---|---|
void |
addDataModificationId(long value)
Update the field maxDataModificationId if this value is higher
than the current value.
|
void |
addDependency(DbObject obj)
Add a new dependency to the set of dependencies.
|
static void |
allColumnsForTableFilters(TableFilter[] filters,
AllColumnsForPlan allColumnsSet)
Get the set of columns of all tables.
|
java.util.HashSet<ColumnResolver> |
getColumnResolvers()
Get the set of column resolvers.
|
static ExpressionVisitor |
getColumnsVisitor(AllColumnsForPlan columns)
Create a new visitor to get all referenced columns.
|
static ExpressionVisitor |
getColumnsVisitor(java.util.HashSet<Column> columns,
Table table)
Create a new visitor to get all referenced columns.
|
static ExpressionVisitor |
getDecrementQueryLevelVisitor(java.util.HashSet<ColumnResolver> columnResolvers,
int queryDecrement)
Create a new visitor to decrement query level in columns with the
specified resolvers.
|
java.util.HashSet<DbObject> |
getDependencies()
Get the dependency set.
|
static ExpressionVisitor |
getDependenciesVisitor(java.util.HashSet<DbObject> dependencies)
Create a new visitor object to collect dependencies.
|
long |
getMaxDataModificationId()
Get the last data modification.
|
static ExpressionVisitor |
getMaxModificationIdVisitor() |
static ExpressionVisitor |
getNotFromResolverVisitor(ColumnResolver resolver)
Create a new visitor to check if no expression depends on the given
resolver.
|
static ExpressionVisitor |
getOptimizableVisitor(Table table)
Create a new visitor to check if all aggregates are for the given table.
|
ColumnResolver |
getResolver()
Get the column resolver.
|
Table |
getTable()
Get the table.
|
int |
getType()
Get the visitor type.
|
ExpressionVisitor |
incrementQueryLevel(int offset)
Increment or decrement the query level.
|
public static final int INDEPENDENT
public static final ExpressionVisitor INDEPENDENT_VISITOR
public static final int OPTIMIZABLE_AGGREGATE
public static final int DETERMINISTIC
public static final ExpressionVisitor DETERMINISTIC_VISITOR
public static final int EVALUATABLE
public static final ExpressionVisitor EVALUATABLE_VISITOR
public static final int SET_MAX_DATA_MODIFICATION_ID
public static final int READONLY
public static final ExpressionVisitor READONLY_VISITOR
public static final int NOT_FROM_RESOLVER
public static final int GET_DEPENDENCIES
public static final int QUERY_COMPARABLE
public static final int GET_COLUMNS1
public static final int GET_COLUMNS2
public static final int DECREMENT_QUERY_LEVEL
public static final ExpressionVisitor QUERY_COMPARABLE_VISITOR
public static ExpressionVisitor getDependenciesVisitor(java.util.HashSet<DbObject> dependencies)
dependencies
- the dependencies setpublic static ExpressionVisitor getOptimizableVisitor(Table table)
table
- the tablepublic static ExpressionVisitor getNotFromResolverVisitor(ColumnResolver resolver)
resolver
- the resolverpublic static ExpressionVisitor getColumnsVisitor(AllColumnsForPlan columns)
columns
- the columns mappublic static ExpressionVisitor getColumnsVisitor(java.util.HashSet<Column> columns, Table table)
columns
- the columns maptable
- table to gather columns from, or null
to gather all columnspublic static ExpressionVisitor getMaxModificationIdVisitor()
public static ExpressionVisitor getDecrementQueryLevelVisitor(java.util.HashSet<ColumnResolver> columnResolvers, int queryDecrement)
columnResolvers
- column resolversqueryDecrement
- 0 to check whether operation is allowed, 1 to actually perform
the decrementpublic void addDependency(DbObject obj)
obj
- the additional dependency.public java.util.HashSet<DbObject> getDependencies()
public ExpressionVisitor incrementQueryLevel(int offset)
offset
- 1 to increment, -1 to decrementpublic ColumnResolver getResolver()
public java.util.HashSet<ColumnResolver> getColumnResolvers()
DECREMENT_QUERY_LEVEL
visitors.public void addDataModificationId(long value)
value
- the data modification idpublic long getMaxDataModificationId()
public Table getTable()
public int getType()
public static void allColumnsForTableFilters(TableFilter[] filters, AllColumnsForPlan allColumnsSet)
filters
- the filtersallColumnsSet
- the on-demand all-columns set