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] Slightly refatory code in LookupChangelogMergeFunctionWrapper #5010

Merged
merged 4 commits into from
Feb 11, 2025

Conversation

leaves12138
Copy link
Contributor

@leaves12138 leaves12138 commented Feb 5, 2025

Purpose

We don't need two merge functions in one LookupChangelogMergeFunctionWrapper

Tests

API and Format

Documentation

@leaves12138 leaves12138 changed the title [core] Slightly refatory code in LookUpFunctionWrapper [core] Slightly refatory code in LookupChangelogMergeFunctionWrapper Feb 5, 2025
@@ -195,4 +205,23 @@ public static String rowDataToString(InternalRow row, RowType type) {
.getFieldOrNull(row)))
.collect(Collectors.joining(", "));
}

/** Copier for KeyValue. */
public static class KeyValueCopier {
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't introduce this.

@@ -68,6 +67,9 @@ public class LookupChangelogMergeFunctionWrapper<T>
private final @Nullable DeletionVectorsMaintainer deletionVectorsMaintainer;
private final Comparator<KeyValue> comparator;

private final LinkedList<KeyValue> candidates = new LinkedList<>();
private final KeyValue.KeyValueCopier keyValueCopier;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just store keySerializer and valueSerializer here.

@wwj6591812
Copy link
Contributor

+1

1 similar comment
@JingsongLi
Copy link
Contributor

+1

@JingsongLi JingsongLi merged commit 7715c60 into apache:master Feb 11, 2025
12 checks passed
JackeyLee007 pushed a commit to JackeyLee007/paimon that referenced this pull request Feb 14, 2025
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.

3 participants