A
SqlOperator
is a type of node in a SQL parse tree (it is NOT a node in a SQL parse tree). It includes functions, operators such as '=', and syntactic constructs such as 'case' statements. Operators may represent query-level expressions (e.g. {@link SqlSelectOperator} or row-levelexpressions (e.g. {@link org.eigenbase.sql.fun.SqlBetweenOperator}.
Operators have formal operands, meaning ordered (and optionally named) placeholders for the values they operate on. For example, the division operator takes two operands; the first is the numerator and the second is the denominator. In the context of subclass {@link SqlFunction}, formal operands are referred to as parameters.
When an operator is instantiated via a {@link SqlCall}, it is supplied with actual operands. For example, in the expression 3 / 5
, the literal expression 3
is the actual operand corresponding to the numerator, and 5
is the actual operand corresponding to the denominator. In the context of SqlFunction, actual operands are referred to as arguments
In many cases, the formal/actual distinction is clear from context, in which case we drop these qualifiers.