Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3641#discussion_r108863035
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/runtime/aggregate/AggregateUtil.scala
 ---
    @@ -1208,5 +1208,40 @@ object AggregateUtil {
       private def gcd(a: Long, b: Long): Long = {
         if (b == 0) a else gcd(b, a % b)
       }
    -}
    +  
    +  /**
    +   * Create an 
[[org.apache.flink.streaming.api.functions.ProcessFunction]] to evaluate final
    +   * aggregate value over a window with processing time boundaries.
    +   *
    +   * @param namedAggregates List of calls to aggregate functions and their 
output field names
    +   * @param inputType Input row type
    +   * @param timeBoundary time limit of the window boundary expressed in 
milliseconds
    +   * @param isPartitioned Flag to indicate whether the input is 
partitioned or not
    +   * @return [[org.apache.flink.streaming.api.functions.ProcessFunction]]
    +   */
    +  private[flink] def createTimeBoundedProcessingOverProcessFunction(
    +    namedAggregates: Seq[CalcitePair[AggregateCall, String]],
    +    inputType: RelDataType,
    +    timeBoundary: Long,
    +    isPartitioned: Boolean = true): ProcessFunction[Row, Row] = {
    +
    +    val (aggFields, aggregates) =
    +      transformToAggregateFunctions(
    +        namedAggregates.map(_.getKey),
    +        inputType,
    +        needRetraction = false)
    --- End diff --
    
    The parameter asks for AggregateFunctions that support retraction. There 
are some functions (like min and max) that are less efficient if they need to 
prepare for retraction. Therefore they have a retractable and a non-retractable 
version. The parameter decides which version is returned.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to