flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-5956) Add retract method into the aggregateFunction
Date Sat, 04 Mar 2017 22:29:46 GMT

    [ https://issues.apache.org/jira/browse/FLINK-5956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15895907#comment-15895907
] 

ASF GitHub Bot commented on FLINK-5956:
---------------------------------------

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

    https://github.com/apache/flink/pull/3470#discussion_r104298360
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/functions/aggfunctions/SumAggFunction.scala
---
    @@ -67,9 +80,9 @@ abstract class SumAggFunction[T: Numeric] extends AggregateFunction[T]
{
         var i: Int = 0
         while (i < accumulators.size()) {
           val a = accumulators.get(i).asInstanceOf[SumAccumulator[T]]
    -      if (a.f1) {
    +      if (a.f1 > 0) {
    --- End diff --
    
    Do we need this check? If `a.f1` is `0`, `a.f0` should be `0` as well (if we only retract
what was added before) and we can simply add sum and count.


> Add retract method into the aggregateFunction
> ---------------------------------------------
>
>                 Key: FLINK-5956
>                 URL: https://issues.apache.org/jira/browse/FLINK-5956
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: Shaoxuan Wang
>            Assignee: Shaoxuan Wang
>
> Retraction method is help for processing updated message. It will also very helpful for
window Aggregation. This PR will first add retraction methods into the aggregateFunctions,
such that on-going over window Aggregation can get benefit from it.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message