Class ConcatenationOperatorNode
java.lang.Object
org.apache.derby.impl.sql.compile.QueryTreeNode
org.apache.derby.impl.sql.compile.ValueNode
org.apache.derby.impl.sql.compile.OperatorNode
org.apache.derby.impl.sql.compile.BinaryOperatorNode
org.apache.derby.impl.sql.compile.ConcatenationOperatorNode
- All Implemented Interfaces:
Visitable
This node represents a concatenation comparison operator
varying.
-
Field Summary
Fields inherited from class BinaryOperatorNode
AND, BinaryArgTypes, BinaryMethodNames, BinaryOperators, BinaryResultTypes, CONCATENATE, DIVIDE, EQ, GE, GT, K_BASE, K_XMLEXISTS, K_XMLQUERY, kind, LE, leftInterfaceType, leftOperand, LIKE, LT, methodName, MINUS, NE, operator, OR, PLUS, receiver, resultInterfaceType, rightInterfaceType, rightOperand, TIMESFields inherited from class ValueNode
transformedFields inherited from class QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX -
Constructor Summary
ConstructorsConstructorDescriptionConcatenationOperatorNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm) Constructor for a ConcatenationOperatorNode -
Method Summary
Modifier and TypeMethodDescription(package private) ValueNodebindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) overrides BindOperatorNode.bindExpression because concatenation has special requirements for parameter binding.private static intclobBlobHandling(DataTypeDescriptor clobBlobType, DataTypeDescriptor otherType) (package private) ValueNodeCheck if this node always evaluates to the same value.private DataTypeDescriptorresolveConcatOperation(DataTypeDescriptor leftType, DataTypeDescriptor rightType) Resolve a concatenation operatorMethods inherited from class BinaryOperatorNode
acceptChildren, bindXMLQuery, categorize, constantExpression, generateExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, isConstantExpression, isEquivalent, isSameNodeKind, preprocess, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, toStringMethods inherited from class OperatorNode
pushSqlXmlUtilMethods inherited from class ValueNode
bindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, genEqualsFalseTree, generate, genIsNullTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, isRelationalOperator, optimizableEqualityNode, putAndsOnTop, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTopMethods inherited from class QueryTreeNode
accept, 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, verifyClassExist
-
Constructor Details
-
ConcatenationOperatorNode
ConcatenationOperatorNode(ValueNode leftOperand, ValueNode rightOperand, ContextManager cm) Constructor for a ConcatenationOperatorNode- Parameters:
leftOperand- The left operand of the concatenationrightOperand- The right operand of the concatenationcm- The context manager
-
-
Method Details
-
evaluateConstantExpressions
Check if this node always evaluates to the same value. If so, return a constant node representing the known result.- Overrides:
evaluateConstantExpressionsin classValueNode- Returns:
- a constant node representing the result of this concatenation
operation, or
thisif the result is not known up front - Throws:
StandardException- if an error occurs during evaluation- See Also:
-
bindExpression
ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException overrides BindOperatorNode.bindExpression because concatenation has special requirements for parameter binding.- Overrides:
bindExpressionin classBinaryOperatorNode- Parameters:
fromList- The FROM list for the query this expression is in, for binding columns.subqueryList- The subquery list being built as we find SubqueryNodesaggregates- The aggregate list being built as we find AggregateNodes- Returns:
- The new top of the expression tree.
- Throws:
StandardException- thrown on failure
-
resolveConcatOperation
private DataTypeDescriptor resolveConcatOperation(DataTypeDescriptor leftType, DataTypeDescriptor rightType) throws StandardException Resolve a concatenation operator- Parameters:
leftType- The DataTypeDescriptor of the left operandrightType- The DataTypeDescriptor of the right operand- Returns:
- A DataTypeDescriptor telling the result type of the concatenate operation
- Throws:
StandardException- BinaryOperatorNotSupported Thrown when a BinaryOperator is not supported on the operand types.
-
clobBlobHandling
private static int clobBlobHandling(DataTypeDescriptor clobBlobType, DataTypeDescriptor otherType) throws StandardException - Throws:
StandardException
-