org.apache.derby.impl.sql.compile
Class ConcatenationOperatorNode

java.lang.Object
  extended by org.apache.derby.impl.sql.compile.QueryTreeNode
      extended by org.apache.derby.impl.sql.compile.ValueNode
          extended by org.apache.derby.impl.sql.compile.OperatorNode
              extended by org.apache.derby.impl.sql.compile.BinaryOperatorNode
                  extended by org.apache.derby.impl.sql.compile.ConcatenationOperatorNode
All Implemented Interfaces:
Node, Visitable

public class ConcatenationOperatorNode
extends BinaryOperatorNode

This node represents a concatenation comparison operator varying.


Field Summary
 
Fields inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
AND, BinaryArgTypes, BinaryMethodNames, BinaryOperators, BinaryResultTypes, CONCATENATE, DIVIDE, EQ, GE, GT, LE, leftInterfaceType, leftOperand, LIKE, LT, methodName, MINUS, NE, operator, operatorType, OR, PLUS, receiver, resultInterfaceType, rightInterfaceType, rightOperand, TIMES, XMLEXISTS_OP, XMLQUERY_OP
 
Fields inherited from class org.apache.derby.impl.sql.compile.ValueNode
transformed
 
Fields inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX, isPrivilegeCollectionRequired
 
Constructor Summary
ConcatenationOperatorNode()
           
 
Method Summary
 ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.List aggregateVector)
          overrides BindOperatorNode.bindExpression because concatenation has special requirements for parameter binding.
private static int clobBlobHandling(DataTypeDescriptor clobBlobType, DataTypeDescriptor otherType)
           
(package private)  ValueNode evaluateConstantExpressions()
          Check if this node always evaluates to the same value.
 void init(java.lang.Object leftOperand, java.lang.Object rightOperand)
          Initializer for a ConcatenationOperatorNode
private  DataTypeDescriptor resolveConcatOperation(DataTypeDescriptor leftType, DataTypeDescriptor rightType)
          Resolve a concatenation operator
 
Methods inherited from class org.apache.derby.impl.sql.compile.BinaryOperatorNode
acceptChildren, bindXMLQuery, categorize, constantExpression, generateExpression, genSQLJavaSQLTree, getLeftOperand, getOrderableVariantType, getReceiverInterfaceName, getRightOperand, init, init, init, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setLeftOperand, setLeftRightInterfaceType, setMethodName, setOperator, setRightOperand, toString
 
Methods inherited from class org.apache.derby.impl.sql.compile.OperatorNode
pushSqlXmlUtil
 
Methods inherited from class org.apache.derby.impl.sql.compile.ValueNode
bindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, genEqualsFalseTree, generate, generateFilter, genIsNullTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isParameterNode, isRelationalOperator, isSameNodeType, optimizableEqualityNode, putAndsOnTop, requiresTypeFromContext, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop
 
Methods inherited from class org.apache.derby.impl.sql.compile.QueryTreeNode
accept, bindOffsetFetch, bindRowMultiSet, bindUserCatalogType, bindUserType, checkReliability, checkReliability, convertDefaultNode, createTypeDependency, debugFlush, debugPrint, disablePrivilegeCollection, formatNodeString, foundString, generateAuthorizeCheck, getBeginOffset, getClassFactory, getCompilerContext, getContextManager, getCursorInfo, getDataDictionary, getDependencyManager, getEndOffset, getExecutionFactory, getGenericConstantActionFactory, getIntProperty, getLanguageConnectionContext, getNodeFactory, getNodeType, getNullNode, getParameterTypes, getSchemaDescriptor, getSchemaDescriptor, getStatementType, getTableDescriptor, getTypeCompiler, init, init, init, init, init, init, init, init, init, isAtomic, isInstanceOf, isPrivilegeCollectionRequired, isSessionSchema, isSessionSchema, makeConstantAction, makeTableName, makeTableName, nodeHeader, orReliability, parseStatement, printLabel, referencesSessionSchema, resolveTableToSynonym, setBeginOffset, setContextManager, setEndOffset, setNodeType, setRefActionInfo, stackPrint, treePrint, treePrint, verifyClassExist
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConcatenationOperatorNode

public ConcatenationOperatorNode()
Method Detail

init

public void init(java.lang.Object leftOperand,
                 java.lang.Object rightOperand)
Initializer for a ConcatenationOperatorNode

Specified by:
init in interface Node
Overrides:
init in class QueryTreeNode
Parameters:
leftOperand - The left operand of the concatenation
rightOperand - The right operand of the concatenation

evaluateConstantExpressions

ValueNode evaluateConstantExpressions()
                                throws StandardException
Check if this node always evaluates to the same value. If so, return a constant node representing the known result.

Overrides:
evaluateConstantExpressions in class ValueNode
Returns:
a constant node representing the result of this concatenation operation, or this if the result is not known up front
Throws:
StandardException - if an error occurs during evaluation
See Also:
ConstantExpressionVisitor

bindExpression

public ValueNode bindExpression(FromList fromList,
                                SubqueryList subqueryList,
                                java.util.List aggregateVector)
                         throws StandardException
overrides BindOperatorNode.bindExpression because concatenation has special requirements for parameter binding.

Overrides:
bindExpression in class BinaryOperatorNode
Parameters:
fromList - The FROM list for the query this expression is in, for binding columns.
subqueryList - The subquery list being built as we find SubqueryNodes
aggregateVector - The aggregate vector 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 operand
rightType - 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

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.