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

Refactor mutate.data.frame() #6563

Merged
merged 10 commits into from
Nov 30, 2022
Merged

Refactor mutate.data.frame() #6563

merged 10 commits into from
Nov 30, 2022

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Nov 24, 2022

This method does four things:

  1. Argument conversion
  2. Execution
  3. Getting input for postprocessing from execution results
  4. Data conversion for postprocessing
  5. Postprocessing

With #6526 and this PR, steps 1, 4 and 5 would remain unchanged, we'd substitute only step 2 and 3. Merging this early would support this effort.

@hadley hadley requested a review from DavisVaughan November 28, 2022 14:59
@krlmlr
Copy link
Member Author

krlmlr commented Nov 28, 2022

Thanks, done.

* Add another test of existing behavior before making changes

* Simplify and optimize `mutate()` refactor further

* Don't name `.data` here

* Use a `switch()` to simplify further

* Move `used` back up

* Rename `names_exprs` to `names_new`
@DavisVaughan DavisVaughan merged commit 48d45c7 into main Nov 30, 2022
@DavisVaughan DavisVaughan deleted the f-refactor-mutate branch November 30, 2022 20:59
@DavisVaughan
Copy link
Member

Thanks @krlmlr!

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