package org.apache.derby.impl.sql.compile;
import org.apache.derby.iapi.services.sanity.SanityManager;
import org.apache.derby.iapi.services.classfile.VMOpcode;
import org.apache.derby.iapi.reference.ClassName;
This node represents a unary getCurrentConnection operator
RESOLVE - parameter will always be null for now. Someday
we may want to allow user to specify which of their connections
they want. Assume that we will use a String.
Constructor for a GetCurrentConnectionNode
Bind this operator
- Parameters:
fromList The query's FROM listsubqueryList The subquery list being built as we find SubqueryNodesaggregateVector The aggregate vector being built as we find AggregateNodes- Throws:
- StandardException Thrown on error
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 StatementouterFromList FromList from outer query blockouterSubqueryList SubqueryList from outer query blockouterPredicateList PredicateList from outer query block- Throws:
- StandardException Thrown on error
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 FromTablessimplePredsOnly Whether or not to consider method
calls, field references and conditional nodes
when building bit map- Returns:
- boolean Whether or not source.expression is a ColumnReference
or a VirtualColumnNode.
Remap all ColumnReferences in this tree to be clones of the
underlying expression.
- Returns:
- JavaValueNode The remapped expression tree.
Bind a ? parameter operand of the char_length function.
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)
- Returns:
- The variant type for the underlying expression.
- Parameters:
acb The ExpressionClassBuilder for the class being builtmb The method the code to place the code- Throws:
- StandardException Thrown on error
- See also:
- ConstantNode.generateExpression
Check the reliability type of this java value.
- Throws:
- StandardException Thrown on error
- See also:
- org.apache.derby.iapi.sql.compile.CompilerContext