| Access | Constructor and Description |
|---|---|
| pack-priv | AndNode(ValueNode
The left operand of the AND leftOperand, ValueNode The right operand of the AND rightOperand, ContextManager context manager cm)
|
| pack-priv | AndNode(ValueNode
The left operand of the AND leftOperand, ValueNode The right operand of the AND rightOperand, String The methods name methodName, ContextManager context manager cm)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv ValueNode | Returns: The new top of the expression tree.The query's FROM list fromList, SubqueryList The subquery list being built as we find SubqueryNodes subqueryList, List<AggregateNode> The aggregate list being built as we find AggregateNodes aggregates)Overrides org. Bind this logical operator. |
| pack-priv ValueNode | Returns: The modified expressionWhether or not we are under a top level AndNode. underTopAndNode)Overrides org. Finish putting an expression into conjunctive normal form. |
| pack-priv ValueNode | Returns: The modified expressionWhether or not we are under a NotNode. underNotNode)Overrides org. Eliminate NotNodes in the current query block. |
| pack-priv void | postBindFixup()
Do bind() by hand for an AndNode that was generated after bind(), eg by putAndsOnTop(). |
| pack-priv ValueNode | Returns: The modified expressionNumber of tables in the DML Statement numTables, FromList FromList from outer query block outerFromList, SubqueryList SubqueryList from outer query block outerSubqueryList, PredicateList PredicateList from outer query block outerPredicateList)Overrides org. Preprocess an expression tree. |
| pack-priv ValueNode | Returns: The modified expressionOverrides org. Do the 1st step in putting an expression into conjunctive normal form. |
| pack-priv boolean | Returns: Boolean which reflects validity of the tree.Overrides org. Verify that changeToCNF() did its job correctly. |
| pack-priv boolean | Returns: Boolean which reflects validity of the tree.Overrides org. Verify that putAndsOnTop() did its job correctly. |
| AndNode | back to summary |
|---|---|
pack-priv AndNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm) throws StandardException
| |
| AndNode | back to summary |
|---|---|
pack-priv AndNode(ValueNode leftOperand, ValueNode rightOperand, String methodName, ContextManager cm) throws StandardException
| |
| bindExpression | back to summary |
|---|---|
| pack-priv ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException Overrides org. Bind this logical operator. All that has to be done for binding a logical operator is to bind the operands, check that both operands are BooleanDataValue, and set the result type to BooleanDataValue.
| |
| changeToCNF | back to summary |
|---|---|
| pack-priv ValueNode changeToCNF(boolean underTopAndNode) throws StandardException Overrides org. 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.
| |
| eliminateNots | back to summary |
|---|---|
| pack-priv ValueNode eliminateNots(boolean underNotNode) throws StandardException Overrides org. 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.
| |
| postBindFixup | back to summary |
|---|---|
| pack-priv void postBindFixup() throws StandardException Do bind() by hand for an AndNode that was generated after bind(), eg by putAndsOnTop(). (Set the data type and nullability info.)
| |
| preprocess | back to summary |
|---|---|
| pack-priv ValueNode preprocess(int numTables, FromList outerFromList, SubqueryList outerSubqueryList, PredicateList outerPredicateList) throws StandardException Overrides org. 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.
| |
| putAndsOnTop | back to summary |
|---|---|
| pack-priv ValueNode putAndsOnTop() throws StandardException Overrides org. 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 terminated by a true BooleanConstantNode.
| |
| verifyChangeToCNF | back to summary |
|---|---|
| pack-priv boolean verifyChangeToCNF() Overrides org. 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
| |
| verifyPutAndsOnTop | back to summary |
|---|---|
| pack-priv boolean verifyPutAndsOnTop() Overrides org. Verify that putAndsOnTop() did its job correctly. Verify that the top level of the expression is a chain of AndNodes terminated by a true BooleanConstantNode.
| |