Visitableclass UnaryArithmeticOperatorNode extends UnaryOperatorNode
| Modifier and Type | Field | Description |
|---|---|---|
(package private) static int |
K_ABS |
|
(package private) static int |
K_MINUS |
|
(package private) static int |
K_PLUS |
|
(package private) static int |
K_SQRT |
|
(package private) int |
kind |
This class is used to hold logically different objects for
space efficiency.
|
private static java.lang.String[] |
UNARY_METHODS |
|
private static java.lang.String[] |
UNARY_OPERATORS |
AUTOINCREMENT_CREATE_MODIFY, AUTOINCREMENT_CYCLE, AUTOINCREMENT_INC_INDEX, AUTOINCREMENT_IS_AUTOINCREMENT_INDEX, AUTOINCREMENT_START_INDEXK_BASE, K_XMLPARSE, K_XMLSERIALIZE, methodName, operand, operator, receiverInterfaceType, resultInterfaceType, UnaryArgTypes, UnaryMethodNames, UnaryOperators, UnaryResultTypestransformed| Constructor | Description |
|---|---|
UnaryArithmeticOperatorNode(ValueNode operand,
int kind,
ContextManager cm) |
| Modifier and Type | Method | Description |
|---|---|---|
(package private) ValueNode |
bindExpression(FromList fromList,
SubqueryList subqueryList,
java.util.List<AggregateNode> aggregates) |
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 +/-.
|
(package private) void |
generateExpression(ExpressionClassBuilder acb,
MethodBuilder mb) |
Do code generation for this unary plus operator
|
boolean |
isParameterNode() |
A +?
|
(package private) boolean |
isSameNodeKind(ValueNode o) |
Some node classes represent several logical node types (to reduce
footprint), which we call kinds.
|
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.
|
(package private) void |
setType(DataTypeDescriptor descriptor) |
We are overwriting this method here because for -?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpushSqlXmlUtilaccept, 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, verifyClassExistacceptChildren, addXmlOpMethodParams, bindOperand, categorize, constantExpression, getOperand, getOperatorString, getOrderableVariantType, getParameterOperand, getReceiverInterfaceName, isConstantExpression, isEquivalent, preprocess, printSubNodes, remapColumnReferencesToExpressions, setMethodName, setOperator, toStringbindExpression, changeToCNF, checkIsBoolean, checkTopPredicatesForEqualsConditions, copyFields, eliminateNots, evaluateConstantExpressions, genEqualsFalseTree, generate, genIsNullTree, genSQLJavaSQLTree, getClone, getColumnName, getConstantValueAsObject, getDataValueFactory, getSchemaName, getSourceResultColumn, getTableName, getTablesReferenced, getTransformed, getTypeCompiler, getTypeId, getTypeServices, isBinaryEqualsOperatorNode, isBooleanFalse, isBooleanTrue, isCloneable, isInListProbeNode, isRelationalOperator, optimizableEqualityNode, putAndsOnTop, selectivity, setCollationInfo, setCollationInfo, setCollationUsingCompilationSchema, setCollationUsingCompilationSchema, setNullability, setTransformed, setType, setType, updatableByCursor, verifyChangeToCNF, verifyEliminateNots, verifyPutAndsOnTopprivate static final java.lang.String[] UNARY_OPERATORS
private static final java.lang.String[] UNARY_METHODS
static final int K_PLUS
static final int K_MINUS
static final int K_SQRT
static final int K_ABS
final int kind
kind represents the logical object
type. See also ValueNode.isSameNodeKind(org.apache.derby.impl.sql.compile.ValueNode).UnaryArithmeticOperatorNode(ValueNode operand, int kind, ContextManager cm) throws StandardException
operand - The operand of the nodekind - unary operator identitycm - context managerStandardExceptionpublic boolean requiresTypeFromContext()
requiresTypeFromContext in class ValueNodeValueNode.requiresTypeFromContext()public boolean isParameterNode()
isParameterNode in class ValueNodevoid bindParameter()
throws StandardException
bindParameter in class UnaryOperatorNodeStandardException - Thrown if ? parameter doesn't
have a type bound to it yet.
? parameter where it isn't allowed.ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, java.util.List<AggregateNode> aggregates) throws StandardException
bindExpression in class UnaryOperatorNodefromList - The query's FROM listsubqueryList - The subquery list being built as we find SubqueryNodesaggregates - The aggregate list being built as we find AggregateNodesStandardException - Thrown on errorprivate void checkOperandIsNumeric(TypeId operandType) throws StandardException
StandardExceptionvoid generateExpression(ExpressionClassBuilder acb, MethodBuilder mb) throws StandardException
generateExpression in class UnaryOperatorNodeacb - 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 errorvoid setType(DataTypeDescriptor descriptor) throws StandardException
setType in class ValueNodedescriptor - The DataTypeServices to set in this
ValueNodeStandardExceptionboolean isSameNodeKind(ValueNode o)
ValueNodeValueNode.isEquivalent(org.apache.derby.impl.sql.compile.ValueNode)
cannot always just use instanceof to check if the other node
represents the same kind. Hence this method needs to be
overridden by all node classes that represent several kinds.
This default implementation does not look at kinds.
It is only called from implementations of isEquivalent.isSameNodeKind in class UnaryOperatorNodeo - The other value node whose kind we want to compare with.true if this and o represent the same
logical node type, i.e. kind.Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.