Class BinaryArithmeticOperatorNode

All Implemented Interfaces:
Visitable

public final class BinaryArithmeticOperatorNode extends BinaryOperatorNode
This node represents a binary arithmetic operator, like + or *.
  • Field Details

  • Constructor Details

    • BinaryArithmeticOperatorNode

      BinaryArithmeticOperatorNode(int kind, ValueNode leftOperand, ValueNode rightOperand, ContextManager cm)
      Constructor for a BinaryArithmeticOperatorNode
      Parameters:
      kind - The kind of operator
      leftOperand - The left operand
      rightOperand - The right operand
      cm - The context manager
  • Method Details

    • bindExpression

      ValueNode bindExpression(FromList fromList, SubqueryList subqueryList, List<AggregateNode> aggregates) throws StandardException
      Bind this operator
      Overrides:
      bindExpression in class BinaryOperatorNode
      Parameters:
      fromList - The query's FROM list
      subqueryList - The subquery list being built as we find SubqueryNodes
      aggregates - The aggregate list being built as we find AggregateNodes
      Returns:
      The new top of the expression tree.
      Throws:
      StandardException - Thrown on error
    • isSameNodeKind

      boolean isSameNodeKind(ValueNode o)
      Description copied from class: ValueNode
      Some node classes represent several logical node types (to reduce footprint), which we call kinds. This means that implementations of ValueNode.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.
      Overrides:
      isSameNodeKind in class BinaryOperatorNode
      Parameters:
      o - The other value node whose kind we want to compare with.
      Returns:
      true if this and o represent the same logical node type, i.e. kind.