Skip to content

Nonstrict join between tow dataframes#87

Open
WillCup wants to merge 6 commits intocardillo:masterfrom
WillCup:will
Open

Nonstrict join between tow dataframes#87
WillCup wants to merge 6 commits intocardillo:masterfrom
WillCup:will

Conversation

@WillCup
Copy link
Copy Markdown

@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