Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Agg 'collect' and 'merge_map' support retract #2816

Merged
merged 7 commits into from
Jan 31, 2024

Conversation

yuzelin
Copy link
Contributor

@yuzelin yuzelin commented Jan 30, 2024

Purpose

The retract isn't correct when:

  1. If the retract field arrives but accumulator doesn't, won't retract;
  2. The retract field from one input stream will retract the result merged from multiple input streams.
    for example, using merge_map, acc (1, A) + input (1, B) will get (1, B), and if retract (1, A) later, the result (1, B) will be deleted from result map.

Tests

API and Format

Documentation

Copy link
Contributor

@JingsongLi JingsongLi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 Please update documentation too.

@@ -83,7 +83,8 @@ public ChangelogMode getChangelogMode(ChangelogMode requestedMode) {
return requestedMode;
}

if (options.get(MERGE_ENGINE) == MergeEngine.AGGREGATE) {
MergeEngine mergeEngine = options.get(MERGE_ENGINE);
if (mergeEngine == MergeEngine.AGGREGATE || mergeEngine == MergeEngine.PARTIAL_UPDATE) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if agg func is defined

@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit 0bee22e into apache:master Jan 31, 2024
10 checks passed
@yuzelin yuzelin deleted the retract branch January 31, 2024 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants