Uh oh!
There was an error while loading. Please reload this page.
ARROW-14659: [R] Remove warning about factor conversion to string in if_else() - #11794
ARROW-14659: [R] Remove warning about factor conversion to string in if_else()#11794stephhazlitt wants to merge 5 commits into
Conversation
nealrichardson
commented
Nov 29, 2021
Fails how? |
stephhazlitt
commented
Nov 29, 2021
With the e.g. |
ianmcook
commented
Nov 29, 2021
There is a similar test here, in which I solved the same failure by using: transmute(across(where(is.factor), ~factor(.x, levels= c(...))))I think you can use that approach here too! |
stephhazlitt
commented
Nov 29, 2021
Thanks @ianmcook, I replaced the |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Neal Richardson <neal.p.richardson@gmail.com>
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Ian Cook <ianmcook@gmail.com>
Benchmark runs are scheduled for baseline = 4913352 and contender = b83e6b0. b83e6b0 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
This is my first PR contributing (or an attempt to contribute) to {arrow}.
This PR:
• removes
warn_typeswarning that factors are converted to strings, which is no longer true https://github.com/apache/arrow/blob/master/r/R/dplyr-functions.R#L911-L920• updates the test by removing the warning https://github.com/apache/arrow/blob/master/r/tests/testthat/test-dplyr-funcs-conditional.R#L130
however it does not remove themutate()in the test as suggested in the TODO, if removed the test fails?• [UPDATE] test includes a reset of the levels of all factor columns to pass, since Arrow if_else() kernel does not preserve unused factor levels (ARROW-14649)