| java.lang.Object org.apache.derby.impl.sql.compile.QueryTreeNode org.apache.derby.impl.sql.compile.ValueNode
All known Subclasses: org.apache.derby.impl.sql.compile.ResultColumn, org.apache.derby.impl.sql.compile.CurrentDatetimeOperatorNode, org.apache.derby.impl.sql.compile.TernaryOperatorNode, org.apache.derby.impl.sql.compile.UnaryOperatorNode, org.apache.derby.impl.sql.compile.ParameterNode, org.apache.derby.impl.sql.compile.BinaryOperatorNode, org.apache.derby.impl.sql.compile.SpecialFunctionNode, org.apache.derby.impl.sql.compile.ConstantNode, org.apache.derby.impl.sql.compile.JavaToSQLValueNode, org.apache.derby.impl.sql.compile.ColumnReference, org.apache.derby.impl.sql.compile.VirtualColumnNode, org.apache.derby.impl.sql.compile.BinaryListOperatorNode, org.apache.derby.impl.sql.compile.CastNode, org.apache.derby.impl.sql.compile.BaseColumnNode, org.apache.derby.impl.sql.compile.ConditionalNode, org.apache.derby.impl.sql.compile.CurrentRowLocationNode, org.apache.derby.impl.sql.compile.DefaultNode, org.apache.derby.impl.sql.compile.CoalesceFunctionNode, org.apache.derby.impl.sql.compile.SubqueryNode,
ValueNode | abstract public class ValueNode extends QueryTreeNode (Code) | | A ValueNode is an abstract class for all nodes that can represent data
values, that is, constants, columns, and expressions.
author: Jeff Lichtman |
Method Summary | |
public ValueNode | bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector) | public ValueNode | bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, boolean forQueryRewrite) Bind this expression. | public boolean | categorize(JBitSet referencedTabs, boolean simplePredsOnly) Categorize this predicate. | public ValueNode | changeToCNF(boolean underTopAndNode) Finish putting an expression into conjunctive normal
form. | public ValueNode | checkIsBoolean() Bind time logic. | public void | checkReliability(String fragmentType, int fragmentBitMask) Bind time logic. | public void | checkReliability(int fragmentBitMask, String fragmentType) Bind time logic. | void | checkTopPredicatesForEqualsConditions(int tableNumber, boolean[] eqOuterCols, int[] tableNumbers, JBitSet[] tableColMap, boolean resultColTable) Update the array of columns in = conditions with expressions without
column references from the same table. | public boolean | constantExpression(PredicateList whereClause) Return whether or not this expression tree represents a constant value.
In this case, "constant" means that it will always evaluate to the
same thing, even if it includes columns. | public void | copyFields(ValueNode oldVN) Copy all of the "appropriate fields" for a shallow copy. | ValueNode | eliminateNots(boolean underNotNode) Eliminate NotNodes in the current query block. | public ValueNode | genEqualsFalseTree() Transform this into this = false. | public ValueNode | genIsNullTree() Transform this into this is null. | public ValueNode | genSQLJavaSQLTree() Generate a SQL->Java->SQL conversion tree above the current node
and bind the new nodes individually.
This is useful when doing comparisons, built-in functions, etc. | final protected void | generate(ActivationClassBuilder acb, MethodBuilder mb) Do the code generation for this node. | public void | generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) Generate code for this calculation. | public void | generateFilter(ExpressionClassBuilder ecb, MethodBuilder mb) The only reason this routine exists is so that I don't have to change
the protection on generateExpression() and rototill all of QueryTree. | public int | getClause() Get the clause that this node appears in. | public ValueNode | getClone() Return a clone of this node. | public String | getColumnName() This is null so that the caller will substitute in the resultset generated
name as needed. | Object | getConstantValueAsObject() Return an Object representing the bind time value of this
expression tree. | final protected DataValueFactory | getDataValueFactory() | protected int | getOrderableVariantType() Return the variant type for the underlying expression. | public String | getSchemaName() This returns the user-supplied schema name of the column.
At this class level, it simply returns null. | public ResultColumn | getSourceResultColumn() Get the source for this ValueNode. | public String | getTableName() This returns the user-supplied table name of the column.
At this class level, it simply returns null. | JBitSet | getTablesReferenced() | boolean | getTransformed() Return whether or not this predicate has been transformed. | public TypeCompiler | getTypeCompiler() Get the TypeCompiler from this ValueNode, based on its TypeId. | public TypeId | getTypeId() Get the TypeId from this ValueNode.
The TypeId from this ValueNode. | public DataTypeDescriptor | getTypeServices() Get the DataTypeServices from this ValueNode.
The DataTypeServices from this ValueNode. | public void | init(Object typeId, Object precision, Object scale, Object isNullable, Object maximumWidth) Initializer for numeric types. | public boolean | isBinaryEqualsOperatorNode() Returns true if this value node is a equals operator. | boolean | isBooleanFalse() Does this represent a false constant. | boolean | isBooleanTrue() Does this represent a true constant. | public boolean | isCloneable() Return whether or not this expression tree is cloneable. | public boolean | isConstantExpression() Return whether or not this expression tree represents a constant expression. | abstract protected boolean | isEquivalent(ValueNode other) Tests if this node is equivalent to the specified ValueNode. | public boolean | isParameterNode() Returns TRUE if this is a parameter node. | public boolean | isRelationalOperator() Returns true if this ValueNode is a relational operator. | final protected boolean | isSameNodeType(ValueNode other) Tests if this node is of the same type as the specified node as
reported by
QueryTreeNode.getNodeType .
Parameters: other - the node to compare this value node against. | public boolean | optimizableEqualityNode(Optimizable optTable, int columnNumber, boolean isNullOkay) Return true if the predicate represents an optimizable equality node.
an expression is considered to be an optimizable equality node if all the
following conditions are met:
- the operator is an = or IS NULL operator
- one of the operands is a column specified by optTable/columnNumber
- Both operands are not the same column; i.e tab.col = tab.col
- There are no implicit varchar comparisons of the operands; i.e
either both operands are string like (varchar, char, longvarchar) or
neither operand is string like
Parameters: optTable - the table being optimized. | public ValueNode | preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) Preprocess an expression tree. | public ValueNode | putAndsOnTop() Do the 1st step in putting an expression into conjunctive normal
form. | public ValueNode | remapColumnReferencesToExpressions() Remap all ColumnReferences in this tree to be clones of the
underlying expression. | public boolean | requiresTypeFromContext() Returns TRUE if the type of this node will be determined from the
context in which it is getting used. | public double | selectivity(Optimizable optTable) The default selectivity for value nodes is 50%. | public void | setClause(int clause) Set the clause that this node appears in. | void | setTransformed() Mark this predicate has having been transformed (other predicates
were generated from it). | public void | setType(DataTypeDescriptor dataTypeServices) Set the DataTypeServices for this ValueNode. | public String | toString() Convert this object to a String. | public boolean | updatableByCursor() | public boolean | verifyChangeToCNF() Verify that changeToCNF() did its job correctly. | boolean | verifyEliminateNots() Verify that eliminateNots() did its job correctly. | public boolean | verifyPutAndsOnTop() Verify that putAndsOnTop() did its job correctly. |
IN_HAVING_CLAUSE | final public static int IN_HAVING_CLAUSE(Code) | | |
IN_SELECT_LIST | final public static int IN_SELECT_LIST(Code) | | |
IN_UNKNOWN_CLAUSE | final public static int IN_UNKNOWN_CLAUSE(Code) | | |
IN_WHERE_CLAUSE | final public static int IN_WHERE_CLAUSE(Code) | | |
clause | protected int clause(Code) | | |
transformed | boolean transformed(Code) | | |
ValueNode | public ValueNode()(Code) | | |
ValueNode | ValueNode(Object tcf, Object typeId, Object isNullable, Object maximumWidth) throws StandardException(Code) | | Initializer for non-numeric types.
Parameters: tcf - The factory to get theDataTypeServicesFactory from Parameters: typeId - The TypeID of this new node Parameters: isNullable - The nullability of this new node Parameters: maximumWidth - The maximum width of this new node exception: StandardException - |
bindExpression | public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, Vector aggregateVector, boolean forQueryRewrite) throws StandardException(Code) | | Bind this expression. This is a place-holder method - it should never
be called.
Parameters: fromList - The FROM list to use for binding Parameters: subqueryList - The SubqueryList we are building as we hitSubqueryNodes. Parameters: aggregateVector - The aggregate vector being built as we find AggregateNodes The new top of the expression tree. exception: StandardException - Thrown on error |
categorize | public boolean categorize(JBitSet referencedTabs, boolean simplePredsOnly) throws StandardException(Code) | | Categorize this predicate. Initially, this means
building a bit map of the referenced tables for each predicate.
If the source of this ColumnReference (at the next underlying level)
is not a ColumnReference or a VirtualColumnNode then this predicate
will not be pushed down.
For example, in:
select * from (select 1 from s) a (x) where x = 1
we will not push down x = 1.
NOTE: It would be easy to handle the case of a constant, but if the
inner SELECT returns an arbitrary expression, then we would have to copy
that tree into the pushed predicate, and that tree could contain
subqueries and method calls.
RESOLVE - revisit this issue once we have views.
Parameters: referencedTabs - JBitSet with bit map of referenced FromTables Parameters: simplePredsOnly - Whether or not to consider methodcalls, field references and conditional nodeswhen building bit map boolean Whether or not source.expression is a ColumnReferenceor a VirtualColumnNode. exception: StandardException - Thrown on error |
changeToCNF | public ValueNode changeToCNF(boolean underTopAndNode) throws StandardException(Code) | | Finish putting an expression into conjunctive normal
form. An expression tree in conjunctive normal form meets
the following criteria:
o If the expression tree is not null,
the top level will be a chain of AndNodes terminating
in a true BooleanConstantNode.
o The left child of an AndNode will never be an AndNode.
o Any right-linked chain that includes an AndNode will
be entirely composed of AndNodes terminated by a true BooleanConstantNode.
o The left child of an OrNode will never be an OrNode.
o Any right-linked chain that includes an OrNode will
be entirely composed of OrNodes terminated by a false BooleanConstantNode.
o ValueNodes other than AndNodes and OrNodes are considered
leaf nodes for purposes of expression normalization.
In other words, we won't do any normalization under
those nodes.
In addition, we track whether or not we are under a top level AndNode.
SubqueryNodes need to know this for subquery flattening.
Parameters: underTopAndNode - Whether or not we are under a top level AndNode. The modified expression exception: StandardException - Thrown on error |
checkIsBoolean | public ValueNode checkIsBoolean() throws StandardException(Code) | | Bind time logic. Raises an error if this ValueNode does not resolve to
a boolean value. This method is called by WHERE clauses.
bound coercion of this node to a builtin type as necessary exception: StandardException - Thrown on error |
checkReliability | public void checkReliability(String fragmentType, int fragmentBitMask) throws StandardException(Code) | | Bind time logic. Raises an error if this ValueNode, once compiled, returns
unstable results AND if we're in a context where unstable results are
forbidden.
Called by children who may NOT appear in the WHERE subclauses of ADD TABLE clauses.
Parameters: fragmentType - Type of fragment as a String, for inclusion in error messages. Parameters: fragmentBitMask - Type of fragment as a bitmask of possible fragment types exception: StandardException - Thrown on error |
checkReliability | public void checkReliability(int fragmentBitMask, String fragmentType) throws StandardException(Code) | | Bind time logic. Raises an error if this ValueNode, once compiled, returns
unstable results AND if we're in a context where unstable results are
forbidden.
Called by children who may NOT appear in the WHERE subclauses of ADD TABLE clauses.
Parameters: fragmentBitMask - Type of fragment as a bitmask of possible fragment types Parameters: fragmentType - Type of fragment as a String, to be fetch for the error message. exception: StandardException - Thrown on error |
checkTopPredicatesForEqualsConditions | void checkTopPredicatesForEqualsConditions(int tableNumber, boolean[] eqOuterCols, int[] tableNumbers, JBitSet[] tableColMap, boolean resultColTable) throws StandardException(Code) | | Update the array of columns in = conditions with expressions without
column references from the same table. This is useful when doing
subquery flattening on the basis of an equality condition.
eqOuterCols or tableColMap may be null if the calling routine
doesn't need the information provided
Parameters: tableNumber - The tableNumber of the table from whichthe columns of interest come from. Parameters: eqOuterCols - Array of booleans for noting which columnsare in = predicates without columns from thesubquery block. May be null. Parameters: tableNumbers - Array of table numbers in this query block. Parameters: tableColMap - Array of bits for noting which columnsare in = predicates for each table in thequery block. May be null. Parameters: resultColTable - True if tableNumber is the table containing resultcolumns exception: StandardException - Thrown on error |
constantExpression | public boolean constantExpression(PredicateList whereClause)(Code) | | Return whether or not this expression tree represents a constant value.
In this case, "constant" means that it will always evaluate to the
same thing, even if it includes columns. A column is constant if it
is compared to a constant expression.
True means this expression tree represents a constant value. |
copyFields | public void copyFields(ValueNode oldVN) throws StandardException(Code) | | Copy all of the "appropriate fields" for a shallow copy.
Parameters: oldVN - The ValueNode to copy from. |
eliminateNots | ValueNode eliminateNots(boolean underNotNode) throws StandardException(Code) | | Eliminate NotNodes in the current query block. We traverse the tree,
inverting ANDs and ORs and eliminating NOTs as we go. We stop at
ComparisonOperators and boolean expressions. We invert
ComparisonOperators and replace boolean expressions with
boolean expression = false.
NOTE: Since we do not recurse under ComparisonOperators, there
still could be NotNodes left in the tree.
Parameters: underNotNode - Whether or not we are under a NotNode. The modified expression exception: StandardException - Thrown on error |
genSQLJavaSQLTree | public ValueNode genSQLJavaSQLTree() throws StandardException(Code) | | Generate a SQL->Java->SQL conversion tree above the current node
and bind the new nodes individually.
This is useful when doing comparisons, built-in functions, etc. on
java types which have a direct mapping to system built-in types.
ValueNode The new tree. exception: StandardException - Thrown on error |
generate | final protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code) | | Do the code generation for this node. Call the more general
routine that generates expressions.
Parameters: acb - The ActivationClassBuilder for the class being built Parameters: mb - The method the expression will go into exception: StandardException - Thrown on error |
generateExpression | public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException(Code) | | Generate code for this calculation. This is a place-holder method -
it should not be called.
Parameters: acb - The ExpressionClassBuilder for the class being built Parameters: mb - The method the expression will go into exception: StandardException - Thrown on error |
generateFilter | public void generateFilter(ExpressionClassBuilder ecb, MethodBuilder mb) throws StandardException(Code) | | The only reason this routine exists is so that I don't have to change
the protection on generateExpression() and rototill all of QueryTree.
Parameters: ecb - The ExpressionClassBuilder for the class being built Parameters: mb - The method the expression will go into exception: StandardException - Thrown on error |
getClause | public int getClause()(Code) | | Get the clause that this node appears in.
int The clause that this node appears in. |
getColumnName | public String getColumnName()(Code) | | This is null so that the caller will substitute in the resultset generated
name as needed.
the default column name for an expression -- null. |
getConstantValueAsObject | Object getConstantValueAsObject() throws StandardException(Code) | | Return an Object representing the bind time value of this
expression tree. If the expression tree does not evaluate to
a constant at bind time then we return null.
This is useful for bind time resolution of VTIs.
RESOLVE: What do we do for primitives?
An Object representing the bind time value of this expression tree.(null if not a bind time constant.) exception: StandardException - Thrown on error |
getOrderableVariantType | protected int getOrderableVariantType() throws StandardException(Code) | | Return the variant type for the underlying expression.
The variant type can be:
VARIANT - variant within a scan
(method calls and non-static field access)
SCAN_INVARIANT - invariant within a scan
(column references from outer tables)
QUERY_INVARIANT - invariant within the life of a query
(constant expressions)
The variant type for the underlying expression. exception: StandardException - Thrown on error |
getSchemaName | public String getSchemaName() throws StandardException(Code) | | This returns the user-supplied schema name of the column.
At this class level, it simply returns null. But, the subclasses
of ValueNode will overwrite this method to return the
user-supplied schema name.
When the value node is in a result column of a select list,
the user can request metadata information. The result column
won't have a column descriptor, so we return some default
information through the expression. This lets expressions that
are simply columns return all of the info, and others use
this supertype's default values.
the default schema name for an expression -- null |
getSourceResultColumn | public ResultColumn getSourceResultColumn()(Code) | | Get the source for this ValueNode.
The source of this ValueNode. |
getTableName | public String getTableName()(Code) | | This returns the user-supplied table name of the column.
At this class level, it simply returns null. But, the subclasses
of ValueNode will overwrite this method to return the
user-supplied table name.
When the value node is in a result column of a select list,
the user can request metadata information. The result column
won't have a column descriptor, so we return some default
information through the expression. This lets expressions that
are simply columns return all of the info, and others use
this supertype's default values.
the default table name for an expression -- null |
getTablesReferenced | JBitSet getTablesReferenced() throws StandardException(Code) | | Get a bit map of table references in this expression
A bit map of table numbers referred to in this expression exception: StandardException - Thrown on error |
getTransformed | boolean getTransformed()(Code) | | Return whether or not this predicate has been transformed.
Whether or not this predicate has been transformed. |
getTypeCompiler | public TypeCompiler getTypeCompiler() throws StandardException(Code) | | Get the TypeCompiler from this ValueNode, based on its TypeId.
This ValueNode's TypeCompiler |
getTypeId | public TypeId getTypeId() throws StandardException(Code) | | Get the TypeId from this ValueNode.
The TypeId from this ValueNode. Thismay be null if the node isn't bound yet. |
getTypeServices | public DataTypeDescriptor getTypeServices() throws StandardException(Code) | | Get the DataTypeServices from this ValueNode.
The DataTypeServices from this ValueNode. Thismay be null if the node isn't bound yet. |
init | public void init(Object typeId, Object precision, Object scale, Object isNullable, Object maximumWidth) throws StandardException(Code) | | Initializer for numeric types.
Parameters: typeId - The TypeID of this new node Parameters: precision - The precision of this new node Parameters: scale - The scale of this new node Parameters: isNullable - The nullability of this new node Parameters: maximumWidth - The maximum width of this new node exception: StandardException - |
isBooleanFalse | boolean isBooleanFalse()(Code) | | Does this represent a false constant.
Whether or not this node represents a false constant. |
isBooleanTrue | boolean isBooleanTrue()(Code) | | Does this represent a true constant.
Whether or not this node represents a true constant. |
isCloneable | public boolean isCloneable()(Code) | | Return whether or not this expression tree is cloneable.
boolean Whether or not this expression tree is cloneable. |
isConstantExpression | public boolean isConstantExpression()(Code) | | Return whether or not this expression tree represents a constant expression.
Whether or not this expression tree represents a constant expression. |
isEquivalent | abstract protected boolean isEquivalent(ValueNode other) throws StandardException(Code) | | Tests if this node is equivalent to the specified ValueNode. Two
ValueNodes are considered equivalent if they will evaluate to the same
value during query execution.
This method provides basic expression matching facility for the derived
class of ValueNode and it is used by the language layer to compare the
node structural form of the two expressions for equivalence at bind
phase.
Note that it is not comparing the actual row values at runtime to produce
a result; hence, when comparing SQL NULLs, they are considered to be
equivalent and not unknown.
One usage case of this method in this context is to compare the select
column expression against the group by expression to check if they are
equivalent. e.g.:
SELECT c1+c2 FROM t1 GROUP BY c1+c2
In general, node equivalence is determined by the derived class of
ValueNode. But they generally abide to the rules below:
- The two ValueNodes must be of the same node type to be considered
equivalent. e.g.: CastNode vs. CastNode - equivalent (if their args
also match), ColumnReference vs CastNode - not equivalent.
- If node P contains other ValueNode(s) and so on, those node(s) must
also be of the same node type to be considered equivalent.
- If node P takes a parameter list, then the number of arguments and its
arguments for the two nodes must also match to be considered
equivalent. e.g.: CAST(c1 as INTEGER) vs CAST(c1 as SMALLINT), they
are not equivalent.
- When comparing SQL NULLs in this context, they are considered to be
equivalent.
- If this does not apply or it is determined that the two nodes are not
equivalent then the derived class of this method should return false;
otherwise, return true.
Parameters: other - the node to compare this ValueNode against. true if the two nodes are equivalent, false otherwise. throws: StandardException - |
isParameterNode | public boolean isParameterNode()(Code) | | Returns TRUE if this is a parameter node. We do lots of special things
with Parameter Nodes.
|
isRelationalOperator | public boolean isRelationalOperator()(Code) | | Returns true if this ValueNode is a relational operator. Relational
Operators are <, <=, =, >, >=, <> as well as IS NULL and IS NOT
NULL. This is the preferred way of figuring out if a ValueNode is
relational or not.
See Also: RelationalOperator See Also: BinaryRelationalOperatorNode See Also: IsNullNode |
isSameNodeType | final protected boolean isSameNodeType(ValueNode other)(Code) | | Tests if this node is of the same type as the specified node as
reported by
QueryTreeNode.getNodeType .
Parameters: other - the node to compare this value node against. true if the two nodes are of the same type. |
optimizableEqualityNode | public boolean optimizableEqualityNode(Optimizable optTable, int columnNumber, boolean isNullOkay) throws StandardException(Code) | | Return true if the predicate represents an optimizable equality node.
an expression is considered to be an optimizable equality node if all the
following conditions are met:
- the operator is an = or IS NULL operator
- one of the operands is a column specified by optTable/columnNumber
- Both operands are not the same column; i.e tab.col = tab.col
- There are no implicit varchar comparisons of the operands; i.e
either both operands are string like (varchar, char, longvarchar) or
neither operand is string like
Parameters: optTable - the table being optimized. Column reference must be fromthis table. Parameters: columnNumber - the column number. One of the operands of thispredicate must be the column number specified by optTable/columnNumber Parameters: isNullOkay - if set to true we also consider IS NULL predicates;otherwise consider only = predicates. |
preprocess | public ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException(Code) | | Preprocess an expression tree. We do a number of transformations
here (including subqueries, IN lists, LIKE and BETWEEN) plus
subquery flattening.
NOTE: This is done before the outer ResultSetNode is preprocessed.
Parameters: numTables - Number of tables in the DML Statement Parameters: outerFromList - FromList from outer query block Parameters: outerSubqueryList - SubqueryList from outer query block Parameters: outerPredicateList - PredicateList from outer query block The modified expression exception: StandardException - Thrown on error |
putAndsOnTop | public ValueNode putAndsOnTop() throws StandardException(Code) | | Do the 1st step in putting an expression into conjunctive normal
form. This step ensures that the top level of the expression is
a chain of AndNodes.
The modified expression exception: StandardException - Thrown on error |
remapColumnReferencesToExpressions | public ValueNode remapColumnReferencesToExpressions() throws StandardException(Code) | | Remap all ColumnReferences in this tree to be clones of the
underlying expression.
ValueNode The remapped expression tree. exception: StandardException - Thrown on error |
requiresTypeFromContext | public boolean requiresTypeFromContext()(Code) | | Returns TRUE if the type of this node will be determined from the
context in which it is getting used.
Whether this node's type will be determined from the context |
selectivity | public double selectivity(Optimizable optTable) throws StandardException(Code) | | The default selectivity for value nodes is 50%. This is overridden
in specific cases, such as the RelationalOperators.
|
setClause | public void setClause(int clause)(Code) | | Set the clause that this node appears in.
Parameters: clause - The clause that this node appears in. |
setTransformed | void setTransformed()(Code) | | Mark this predicate has having been transformed (other predicates
were generated from it). This will help us with ensure that the
predicate does not get calculated into the selectivity multiple
times.
|
setType | public void setType(DataTypeDescriptor dataTypeServices) throws StandardException(Code) | | Set the DataTypeServices for this ValueNode. This method is
overridden in ParameterNode.
Parameters: dataTypeServices - The DataTypeServices to set in thisValueNode |
toString | public String toString()(Code) | | Convert this object to a String. See comments in QueryTreeNode.java
for how this should be done for tree printing.
This object as a String |
updatableByCursor | public boolean updatableByCursor()(Code) | | the default updatability for an expression - false |
verifyChangeToCNF | public boolean verifyChangeToCNF()(Code) | | Verify that changeToCNF() did its job correctly. Verify that:
o AndNode - rightOperand is not instanceof OrNode
leftOperand is not instanceof AndNode
o OrNode - rightOperand is not instanceof AndNode
leftOperand is not instanceof OrNode
Boolean which reflects validity of the tree. |
verifyEliminateNots | boolean verifyEliminateNots()(Code) | | Verify that eliminateNots() did its job correctly. Verify that
there are no NotNodes above the top level comparison operators
and boolean expressions.
Boolean which reflects validity of the tree. |
verifyPutAndsOnTop | public boolean verifyPutAndsOnTop()(Code) | | Verify that putAndsOnTop() did its job correctly. Verify that the top level
of the expression is a chain of AndNodes.
Boolean which reflects validity of the tree. |
Methods inherited from org.apache.derby.impl.sql.compile.QueryTreeNode | public Visitable accept(Visitor v) throws StandardException(Code)(Java Doc) public QueryTreeNode bind() throws StandardException(Code)(Java Doc) public DataValueDescriptor convertDefaultNode(DataTypeDescriptor typeDescriptor) throws StandardException(Code)(Java Doc) protected static void debugFlush()(Code)(Java Doc) public static void debugPrint(String outputString)(Code)(Java Doc) public void disablePrivilegeCollection()(Code)(Java Doc) public String executeSchemaName()(Code)(Java Doc) public String executeStatementName()(Code)(Java Doc) public static String formatNodeString(String nodeString, int depth)(Code)(Java Doc) public boolean foundString(String[] list, String search)(Code)(Java Doc) public GeneratedClass generate(ByteArray ignored) throws StandardException(Code)(Java Doc) protected void generate(ActivationClassBuilder acb, MethodBuilder mb) throws StandardException(Code)(Java Doc) void generateAuthorizeCheck(ActivationClassBuilder acb, MethodBuilder mb, int sqlOperation)(Code)(Java Doc) public int getBeginOffset()(Code)(Java Doc) final protected ClassFactory getClassFactory()(Code)(Java Doc) final protected CompilerContext getCompilerContext()(Code)(Java Doc) final public ContextManager getContextManager()(Code)(Java Doc) public Object getCursorInfo() throws StandardException(Code)(Java Doc) final public DataDictionary getDataDictionary()(Code)(Java Doc) final public DependencyManager getDependencyManager()(Code)(Java Doc) public int getEndOffset()(Code)(Java Doc) final public ExecutionFactory getExecutionFactory()(Code)(Java Doc) final public GenericConstantActionFactory getGenericConstantActionFactory()(Code)(Java Doc) protected int getIntProperty(String value, String key) throws StandardException(Code)(Java Doc) final protected LanguageConnectionContext getLanguageConnectionContext()(Code)(Java Doc) final public NodeFactory getNodeFactory()(Code)(Java Doc) protected int getNodeType()(Code)(Java Doc) public ConstantNode getNullNode(TypeId typeId, ContextManager cm) throws StandardException(Code)(Java Doc) public DataTypeDescriptor[] getParameterTypes() throws StandardException(Code)(Java Doc) public long getRowEstimate()(Code)(Java Doc) public String getSPSName()(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName) throws StandardException(Code)(Java Doc) final SchemaDescriptor getSchemaDescriptor(String schemaName, boolean raiseError) throws StandardException(Code)(Java Doc) protected int getStatementType()(Code)(Java Doc) final protected TableDescriptor getTableDescriptor(String tableName, SchemaDescriptor schema) throws StandardException(Code)(Java Doc) final protected TypeCompiler getTypeCompiler(TypeId typeId)(Code)(Java Doc) public void init(Object arg1) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13) throws StandardException(Code)(Java Doc) public void init(Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6, Object arg7, Object arg8, Object arg9, Object arg10, Object arg11, Object arg12, Object arg13, Object arg14) throws StandardException(Code)(Java Doc) public boolean isAtomic() throws StandardException(Code)(Java Doc) protected boolean isInstanceOf(int nodeType)(Code)(Java Doc) public boolean isPrivilegeCollectionRequired()(Code)(Java Doc) final boolean isSessionSchema(SchemaDescriptor sd)(Code)(Java Doc) final boolean isSessionSchema(String schemaName)(Code)(Java Doc) public ConstantAction makeConstantAction() throws StandardException(Code)(Java Doc) public ResultDescription makeResultDescription() throws StandardException(Code)(Java Doc) public TableName makeTableName(String schemaName, String flatName) throws StandardException(Code)(Java Doc) public boolean needsSavepoint()(Code)(Java Doc) protected String nodeHeader()(Code)(Java Doc) public QueryTreeNode optimize() throws StandardException(Code)(Java Doc) public static QueryTreeNode parseQueryText(CompilerContext compilerContext, String queryText, Object[] paramDefaults, LanguageConnectionContext lcc) throws StandardException(Code)(Java Doc) public void printLabel(int depth, String label)(Code)(Java Doc) public void printSubNodes(int depth)(Code)(Java Doc) public boolean referencesSessionSchema() throws StandardException(Code)(Java Doc) public TableName resolveTableToSynonym(TableName tabName) throws StandardException(Code)(Java Doc) public void setBeginOffset(int beginOffset)(Code)(Java Doc) public void setContextManager(ContextManager cm)(Code)(Java Doc) public void setEndOffset(int endOffset)(Code)(Java Doc) public void setNodeType(int nodeType)(Code)(Java Doc) public void setRefActionInfo(long fkIndexConglomId, int[] fkColArray, String parentResultSetId, boolean dependentScan)(Code)(Java Doc) public String toString()(Code)(Java Doc) public void treePrint()(Code)(Java Doc) public void treePrint(int depth)(Code)(Java Doc) String verifyClassExist(String javaClassName, boolean convertCase) throws StandardException(Code)(Java Doc)
|
|
|