Visitableclass VirtualColumnNode extends ValueNode
| Modifier and Type | Field | Description |
|---|---|---|
(package private) int |
columnId |
|
private boolean |
correlated |
|
private ResultColumn |
sourceColumn |
|
private ResultSetNode |
sourceResultSet |
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEXtransformed| Constructor | Description |
|---|---|
VirtualColumnNode(ResultSetNode sourceResultSet,
ResultColumn sourceColumn,
int columnId,
ContextManager cm) |
Constructor for a VirtualColumnNode.
|
| Modifier and Type | Method | Description |
|---|---|---|
(package private) void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb) |
ColumnNode's are against the current row in the system.
|
(package private) boolean |
getCorrelated() |
Return whether or not this VCN is a correlated reference.
|
protected int |
getOrderableVariantType() |
Return the variant type for the underlying expression.
|
(package private) java.lang.String |
getSchemaName() |
Get the name of the schema the ResultColumn's table is in, if any.
|
(package private) ResultColumn |
getSourceColumn() |
Return the ResultColumn that is the source of this VirtualColumnNode.
|
(package private) ResultColumn |
getSourceResultColumn() |
Return the ResultColumn that is the source of this VirtualColumnNode.
|
(package private) ResultSetNode |
getSourceResultSet() |
Return the ResultSetNode that is the source of this VirtualColumnNode.
|
(package private) java.lang.String |
getTableName() |
Get the name of the table the ResultColumn is in, if any.
|
DataTypeDescriptor |
getTypeServices() |
Get the DataTypeServices from this Node.
|
(package private) boolean |
isCloneable() |
Return whether or not this expression tree is cloneable.
|
(package private) boolean |
isEquivalent(ValueNode o) |
Tests if this node is equivalent to the specified ValueNode.
|
(package private) void |
printSubNodes(int depth) |
Prints the sub-nodes of this object.
|
(package private) void |
setCorrelated() |
Mark this VCN as a reference to a correlated column.
|
void |
setType(DataTypeDescriptor dtd) |
Set the DataTypeServices for this ValueNode.
|
boolean |
updatableByCursor() |
Return whether or not the ResultColumn is wirtable by a positioned update.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaccept, acceptChildren, addTag, addUDTUsagePriv, addUDTUsagePriv, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, copyTagsFrom, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContext, getContextManager, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getLongProperty, getNullNode, getOffsetOrderedNodes, getOptimizerFactory, getOptimizerTracer, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, getUDTDesc, isAtomic, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, optimizerTracingIsOn, orReliability, parseSearchCondition, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setEndOffset, setRefActionInfo, stackPrint, taggedWith, treePrint, treePrint, verifyClassExistbindExpression, bindExpression, categorize, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, constantExpression, copyFields, eliminateNots, evaluateConstantExpressions, genEqualsFalseTree, generate, genIsNullTree, genSQLJavaSQLTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isConstantExpression, isInListProbeNode, isParameterNode, isRelationalOperator, isSameNodeKind, optimizableEqualityNode, preprocess, putAndsOnTop, remapColumnReferencesToExpressions, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, toString, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTopprivate ResultSetNode sourceResultSet
private ResultColumn sourceColumn
int columnId
private boolean correlated
VirtualColumnNode(ResultSetNode sourceResultSet, ResultColumn sourceColumn, int columnId, ContextManager cm) throws StandardException
sourceResultSet - The ResultSetNode where the value is originatingsourceColumn - The ResultColumn where the value is originatingcolumnId - The columnId within the current Rowcm - The context managerStandardExceptionvoid printSubNodes(int depth)
printSubNodes in class QueryTreeNodedepth - The depth of this node in the treeResultSetNode getSourceResultSet()
ResultColumn getSourceColumn()
java.lang.String getTableName()
getTableName in class ValueNodejava.lang.String getSchemaName()
throws StandardException
getSchemaName in class ValueNodeStandardExceptionpublic boolean updatableByCursor()
updatableByCursor in class ValueNodeResultColumn getSourceResultColumn()
getSourceResultColumn in class ValueNodevoid setCorrelated()
boolean getCorrelated()
boolean isCloneable()
isCloneable in class ValueNodevoid generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression in class ValueNodeacb - The ExpressionClassBuilder for the class being builtmb - The method the expression will go intoStandardException - Thrown on errorprotected int getOrderableVariantType()
throws StandardException
getOrderableVariantType in class ValueNodeStandardException - thrown on errorpublic final DataTypeDescriptor getTypeServices()
getTypeServices in class ValueNodepublic final void setType(DataTypeDescriptor dtd) throws StandardException
ValueNodesetType in class ValueNodedtd - The DataTypeServices to set in this
ValueNodeStandardExceptionboolean isEquivalent(ValueNode o) throws StandardException
ValueNodeThis 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:
isEquivalent in class ValueNodeo - the node to compare this ValueNode against.true if the two nodes are equivalent,
false otherwise.StandardExceptionApache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.