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

Join ignores empty string as suffix #317

Closed
ghing opened this issue Jan 26, 2023 · 0 comments · Fixed by #340
Closed

Join ignores empty string as suffix #317

ghing opened this issue Jan 26, 2023 · 0 comments · Fixed by #340

Comments

@ghing
Copy link

ghing commented Jan 26, 2023

Join operations (I haven't tested this on all join operations, mostly just noticed it on left joins) will add a default suffix (i.e. "_1") to the common column names even when you explicitly specify an empty string as one of the suffixes.

Example code:

const t1 = aq.table({ colA: ["a", "b", "c"], colB: [3, 4, 5] });
const t2 = aq.table({ colA: ["a", "b", "c"], colB: [6, 7, 8] });
const joined = t1.join_left(t2, "colA", undefined, { suffix: ["", "_new"] });

Expected result:

colA colB colB_new
a 3 6
b 4 7
c 5 8

Observed result:

colA colB_1 colB_new
a 3 6
b 4 7
c 5 8
@jheer jheer mentioned this issue Nov 16, 2023
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 a pull request may close this issue.

1 participant