| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv | InListOperatorNode(ValueNode
The left operand of the node leftOperand, ValueNodeList The right operand list of the node rightOperandList, ContextManager Context manager cm)
|
| Modifier and Type | Method and Description |
|---|---|
| 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 | generateExpression(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating acb, MethodBuilder The MethodBuilder the expression will go into mb)Overrides org. Do code generation for this IN list operator. |
| protected LocalField | generateListAsArray(ExpressionClassBuilder
The ExpressionClassBuilder for the class we're generating acb, MethodBuilder The MethodBuilder the expression will go into mb)Generate the code to create an array of DataValueDescriptors that will hold the IN-list values at execution time. |
| pack-priv void | generateStartStopKey(boolean
is the index ascending on the column in question isAsc, boolean are we generating start key or not isStartKey, ExpressionClassBuilder The ExpressionClassBuilder for the class we're generating acb, MethodBuilder The MethodBuilder the expression will go into mb)Generate start/stop key for this IN list operator. |
| private DataTypeDescriptor | Returns: the type descriptor for the dominant typeGet the dominant type of all the operands in this IN list. |
| protected boolean | |
| protected void | markAsOrdered()
Indicate that the IN-list values for this node are ordered (i.e. they are all constants and they have been sorted). |
| protected void | markSortDescending()
Indicate that the IN-list values for this node must be sorted in DESCENDING order. |
| 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. |
| public double | selectivity(Optimizable optTable)
Overrides org. The selectivity for an "IN" predicate is generally very small. |
| pack-priv boolean | Returns: true if in list references the same table as in cr.The column reference. cr)See if this IN list operator is referencing the same table. |
| protected InListOperatorNode | shallowCopy()
Create a shallow copy of this InListOperatorNode whose operands are the same as this node's operands. |
| protected boolean | sortDescending()
Return whether or not the IN-list values for this node must be sorted in DESCENDING order. |
| public String | Returns: This object as a StringOverrides org. Convert this object to a String. |
| isOrdered | back to summary |
|---|---|
| private boolean isOrdered | |
| sortDescending | back to summary |
|---|---|
| private boolean sortDescending | |
| InListOperatorNode | back to summary |
|---|---|
pack-priv InListOperatorNode(ValueNode leftOperand, ValueNodeList rightOperandList, ContextManager cm) throws StandardException
| |
| 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.
| |
| generateExpression | back to summary |
|---|---|
| pack-priv void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Overrides org. Do code generation for this IN list operator.
| |
| generateListAsArray | back to summary |
|---|---|
| protected LocalField generateListAsArray(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Generate the code to create an array of DataValueDescriptors that will hold the IN-list values at execution time. The array gets created in the constructor. All constant elements in the array are initialized in the constructor. All non-constant elements, if any, are initialized each time the IN list is evaluated.
| |
| generateStartStopKey | back to summary |
|---|---|
| pack-priv void generateStartStopKey(boolean isAsc, boolean isStartKey, ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException Generate start/stop key for this IN list operator. Bug 3858.
| |
| getDominantType | back to summary |
|---|---|
| private DataTypeDescriptor getDominantType() Get the dominant type of all the operands in this IN list.
| |
| isOrdered | back to summary |
|---|---|
| protected boolean isOrdered() Return whether or not the IN-list values for this node are ordered. This is used for determining whether or not we need to do an execution- time sort. | |
| markAsOrdered | back to summary |
|---|---|
| protected void markAsOrdered() Indicate that the IN-list values for this node are ordered (i.e. they are all constants and they have been sorted). | |
| markSortDescending | back to summary |
|---|---|
| protected void markSortDescending() Indicate that the IN-list values for this node must be sorted in DESCENDING order. This only applies to in-list "multi-probing", where the rows are processed in the order of the IN list elements themselves. In that case, any requirement to sort the rows in descending order means that the values in the IN list have to be sorted in descending order, as well. | |
| 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.
| |
| selectivity | back to summary |
|---|---|
| public double selectivity(Optimizable optTable) Overrides org. The selectivity for an "IN" predicate is generally very small. This is an estimate applicable when in list are not all constants.
| |
| selfReference | back to summary |
|---|---|
| pack-priv boolean selfReference(ColumnReference cr) throws StandardException See if this IN list operator is referencing the same table.
| |
| shallowCopy | back to summary |
|---|---|
| protected InListOperatorNode shallowCopy() throws StandardException Create a shallow copy of this InListOperatorNode whose operands are the same as this node's operands. Copy over all other necessary state, as well. | |
| sortDescending | back to summary |
|---|---|
| protected boolean sortDescending() Return whether or not the IN-list values for this node must be sorted in DESCENDING order. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Convert this object to a String. See comments in QueryTreeNode.java for how this should be done for tree printing. | |