nealrichardson commented on issue #43747: URL: https://github.com/apache/arrow/issues/43747#issuecomment-2323424703
Hi @TPDeramus, a couple of thoughts: * It's hard to help debug these because I don't have access to your database, and the expressions you're writing are very long. Could you reduce this to a minimal reproducible example (reprex)? Maybe using something simple with a date32 column in it, like `arrow_table(x = Sys.Date() + 1:10)` * Doing some exploration around the general area of date data in case_when, I'm seeing trouble with the `.default = NA`, specifically in getting a type mismatch because `NA` is logical in R, so `bool` in Arrow, and all output types need to be the same. I did get something through by doing `TRUE ~ Expression$scalar(NA_integer_)$cast(date32())` as the last case instead of using the `.default` argument. It's making a scalar expression out of something that is able to be cast to `date32()`. Not pretty, but maybe that's enough to get things to work for you? * As you see from `NotImplemented: Unsupported cast from date32[day] to double using function cast_double`, you can't `as.numeric()` a date32. But you can `as.integer()` one. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
