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

Allow one join suffix to be the empty string #2445

Merged
merged 1 commit into from Feb 20, 2017

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Feb 19, 2017

Avoids endless loop.

Fixes #2228.

@hadley: PTAL.

// we suffix by .x if this column is in y_columns (and if the suffix is not empty)
if (suffix_x.length() > 0) {
while (
(std::find(y_columns.begin(), y_columns.end(), col_name.get_sexp()) != y_columns.end()) ||
Copy link
Member

Choose a reason for hiding this comment

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

This seems a bit complicated as a while condition

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. There is also duplication with the R function unique_names(), ideally we'd have one C++ routine for creating column names. Can we merge as-is and postpone cleanup?

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good

@krlmlr krlmlr requested a review from hadley February 20, 2017 15:36
@krlmlr krlmlr merged commit 08ebec7 into tidyverse:master Feb 20, 2017
@krlmlr krlmlr deleted the b-#2228-empty-join branch February 20, 2017 15:37
@lock
Copy link

lock bot commented Jan 18, 2019

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

@lock lock bot locked and limited conversation to collaborators Jan 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants