Details
-
Sub-task
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Currently, we have supported the use of named parameters with optional arguments.
By adapting the interface of Calcite, we can fill in the default operator when a parameter is missing. Whether it is during the validation phase or when converting to SqlToRel phase, we need to handle it specially by modifying the return type of DEFAULT operator based on the argument type of the operator.
We have multiple places that need to handle the type of DEFAULT operator, including SqlCallBinding, SqlOperatorBinding, and SqlToRelConverter.
The improved solution is as follows:
Before SqlToRel, we can construct a DEFAULT node with a return type that matches the argument type. This way, during the SqlToRel phase, there is no need for special handling of the DEFAULT node's type.
Attachments
Issue Links
- links to