Package org.apache.calcite.sql.type
Class OperandHandlers
java.lang.Object
org.apache.calcite.sql.type.OperandHandlers
Strategies for handling operands.
This class defines singleton instances of strategy objects for operand
expansion. OperandTypes
, ReturnTypes
and InferTypes
provide similar strategies for operand type checking and inference,
and operator return type inference.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final SqlOperandHandler
The default operand handler visits all operands.static final SqlOperandHandler
An operand handler that tries to convert operand #1 (0-based) into a time frame. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SqlOperandHandler
Creates an operand handler that applies a function to a call.
-
Field Details
-
DEFAULT
The default operand handler visits all operands. -
OPERAND_1_MIGHT_BE_TIME_FRAME
An operand handler that tries to convert operand #1 (0-based) into a time frame.For example, the
DATE_TRUNC
function uses this; the callsDATE_TRUNC('month', orders.order_date)
,DATE_TRUNC(orders.order_date, MONTH)
,DATE_TRUNC(orders.order_date, MINUTE15)
are all valid. The last uses a user-defined time frame, which appears to the validator as aSqlIdentifier
and is then converted to aSqlIntervalQualifier
when it matches a defined time frame.
-
-
Constructor Details
-
OperandHandlers
public OperandHandlers()
-
-
Method Details
-
of
Creates an operand handler that applies a function to a call.
-