Skip to content

Commit

Permalink
[FLINK-12295][table] Fix comments in MinAggFunction and MaxAggFunction
Browse files Browse the repository at this point in the history
This closes apache#15940
  • Loading branch information
JingsongLi committed May 18, 2021
1 parent 4d33e85 commit 057f86b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,12 @@ public Expression[] accumulateExpressions() {

@Override
public Expression[] retractExpressions() {
// TODO FLINK-12295, ignore exception now
// throw new TableException("This function does not support retraction, Please choose
// MaxWithRetractAggFunction.");
// See optimization in FlinkRelMdModifiedMonotonicity.
// This function can ignore retraction message:
// SQL: SELECT MAX(cnt), SUM(cnt) FROM (SELECT count(a) as cnt FROM T GROUP BY b)
// The cnt is modified increasing, so the MAX(cnt) can ignore retraction message. But this
// doesn't mean that the node won't receive the retraction message, because there are other
// aggregate operators that need retraction message, such as SUM(cnt).
return new Expression[0];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,7 @@ public Expression[] accumulateExpressions() {

@Override
public Expression[] retractExpressions() {
// TODO FLINK-12295, ignore exception now
// throw new TableException("This function does not support retraction, Please choose
// MinWithRetractAggFunction.");
// See MaxAggFunction.retractExpressions
return new Expression[0];
}

Expand Down

0 comments on commit 057f86b

Please sign in to comment.