Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1780

Add `required Order` and `requiresOver` parameters to the constructor of `SqlUserDefinedAggregate Function`

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: core
    • Labels:
      None

      Description

      Currently org.apache.calcite.sql.validate.SqlUserDefinedAggFunction calls the constructor of SqlAggFunction:

      Protected SqlAggFunction (
             String name,
             SqlIdentifier sqlIdentifier,
             SqlKind kind,
             SqlReturnTypeInference returnTypeInference,
             SqlOperandTypeInference operandTypeInference,
             SqlOperandTypeChecker operandTypeChecker,
             SqlFunctionCategory funcType,
             Boolean requiresOrder,
             Boolean requiresOver) 
      

      The requiresOrder = false, requiresOver = false. as follow:

      Public SqlUserDefinedAggFunction (SqlIdentifier opName,
             SqlReturnTypeInference returnTypeInference,
             SqlOperandTypeInference operandTypeInference,
             SqlOperandTypeChecker operandTypeChecker, AggregateFunction function) {
           Super (Util.last (opName.names), opName, SqlKind.OTHER_FUNCTION,
               ReturnTypeInference, operandTypeInference, operandTypeChecker,
               SqlFunctionCategory.USER_DEFINED_FUNCTION, false, false);
           This.function = function;
         } 
      

      I want add `required Order` and `requiresOver` parameters to the constructor of `SqlUserDefinedAggregate Function`.

        Activity

        Hide
        jcamachorodriguez Jesus Camacho Rodriguez added a comment -

        Resolved in release 1.13.0 (2017-06-26).

        Show
        jcamachorodriguez Jesus Camacho Rodriguez added a comment - Resolved in release 1.13.0 (2017-06-26).
        Hide
        julianhyde Julian Hyde added a comment -
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/7c7e932e . Thanks for the PR, sunjincheng !
        Hide
        sunjincheng121 sunjincheng added a comment - - edited
        Show
        sunjincheng121 sunjincheng added a comment - - edited Hi Julian Hyde , I have opened the PR. https://github.com/apache/calcite/pull/446
        Hide
        sunjincheng121 sunjincheng added a comment -

        It's required by FLINK-6462 .

        Show
        sunjincheng121 sunjincheng added a comment - It's required by FLINK-6462 .

          People

          • Assignee:
            sunjincheng121 sunjincheng
            Reporter:
            sunjincheng121 sunjincheng
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development