public class UnaryArithmeticOperatorNode extends UnaryOperatorNode
Modifier and Type | Field and Description |
---|---|
private static int |
ABSOLUTE |
private int |
operatorType |
private static int |
SQRT |
private static java.lang.String[] |
UNARY_METHODS |
private static int |
UNARY_MINUS |
private static java.lang.String[] |
UNARY_OPERATORS |
private static int |
UNARY_PLUS |
methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypes, XMLPARSE_OP, XMLSERIALIZE_OP
transformed
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEX
Constructor and Description |
---|
UnaryArithmeticOperatorNode() |
Modifier and Type | Method and Description |
---|---|
ValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List aggregateVector)
Bind this operator
|
(package private) void |
bindParameter()
For SQRT and ABS the parameter becomes a DOUBLE.
|
private void |
bindSQRTABS()
Bind SQRT or ABS
|
private void |
checkOperandIsNumeric(TypeId operandType)
Only called for Unary +/-.
|
void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb)
Do code generation for this unary plus operator
|
void |
init(java.lang.Object operand)
Initializer for a UnaryArithmeticOperatorNode
|
boolean |
isParameterNode()
A +?
|
boolean |
requiresTypeFromContext()
Unary + and - require their type to be set if
they wrap another node (e.g. a parameter) that
requires type from its context.
|
void |
setType(DataTypeDescriptor descriptor)
We are overwriting this method here because for -?
|
acceptChildren, addXmlOpMethodParams, bindOperand, categorize, constantExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, getReceiverInterfaceName, init, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toString
pushSqlXmlUtil
bindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, evaluateConstantExpressions, genEqualsFalseTree, generate, generateFilter, genIsNullTree, genSQLJavaSQLTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, init, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isRelationalOperator, isSameNodeType, optimizableEqualityNode, putAndsOnTop, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTop
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, 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
private static final int UNARY_PLUS
private static final int UNARY_MINUS
private static final int SQRT
private static final int ABSOLUTE
private static final java.lang.String[] UNARY_OPERATORS
private static final java.lang.String[] UNARY_METHODS
private int operatorType
public void init(java.lang.Object operand)
init
in interface Node
init
in class UnaryOperatorNode
operand
- The operand of the nodepublic boolean requiresTypeFromContext()
requiresTypeFromContext
in class ValueNode
ValueNode.requiresTypeFromContext()
public boolean isParameterNode()
isParameterNode
in class ValueNode
void bindParameter() throws StandardException
bindParameter
in class UnaryOperatorNode
StandardException
- Thrown if ? parameter doesn't
have a type bound to it yet.
? parameter where it isn't allowed.public ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.List aggregateVector) throws StandardException
bindExpression
in class UnaryOperatorNode
fromList
- The query's FROM listsubqueryList
- The subquery list being built as we find SubqueryNodesaggregateVector
- The aggregate vector being built as we find AggregateNodesStandardException
- Thrown on errorprivate void checkOperandIsNumeric(TypeId operandType) throws StandardException
StandardException
public void generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression
in class UnaryOperatorNode
acb
- The ExpressionClassBuilder for the class we're generatingmb
- The method the expression will go intoStandardException
- Thrown on errorprivate void bindSQRTABS() throws StandardException
StandardException
- Thrown on errorpublic void setType(DataTypeDescriptor descriptor) throws StandardException
setType
in class ValueNode
descriptor
- The DataTypeServices to set in this
ValueNodeStandardException
Apache Derby V10.10 Internals - Copyright © 2004,2014 The Apache Software Foundation. All Rights Reserved.