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

Nonstrict join between tow dataframes #87

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

WillCup
Copy link

@WillCup WillCup commented Jul 23, 2020

For now, the key in dataframes those to be joined must be unique.

`
for (final List row : left) {
final Object name = leftIt.next();
final Object key = on == null ? name : on.apply(row);
if (leftMap.put(key, row) != null) {
throw new IllegalArgumentException("generated key is not unique: " + key);
}
}

    for (final List<V> row : right) {
        final Object name = rightIt.next();
        final Object key = on == null ? name : on.apply(row);
        if (rightMap.put(key, row) != null) {
            throw new IllegalArgumentException("generated key is not unique: " + key);
        }
    }

`

But we just want to join two dataframe toghter, A has column 'dt' and B has column 'dt', then A and B can join based on 'dt' column. In this scenario, we should not force A has distinct date values..

So, I add a new API called nonStrictJoinOn to solve this problem.

FYI.

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.

1 participant