Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-34054 FLIP-387: Support named parameters for functions and procedures
  3. FLINK-34312

Improve the handling of default node types for named parameters.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.20.0
    • 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

          Activity

            People

              hackergin Feng Jin
              hackergin Feng Jin
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: