nealrichardson commented on code in PR #43446:
URL: https://github.com/apache/arrow/pull/43446#discussion_r1694005075
##########
r/R/dplyr-funcs-conditional.R:
##########
@@ -21,9 +21,16 @@ register_bindings_conditional <- function() {
value_set <- Array$create(table)
# If possible, `table` should be the same type as `x`
# Try downcasting here; otherwise Acero may upcast x to table's type
+ x_type <- x$type()
+ # GH-43440: `is_in` doesn't want a DictionaryType in the value_set,
+ # so we'll cast to its value_type
+ # TODO: should this be pushed into cast_or_parse? Is this a bigger issue?
+ if (inherits(x_type, "DictionaryType")) {
+ x_type <- x_type$value_type
+ }
try(
- value_set <- cast_or_parse(value_set, x$type()),
- silent = TRUE
+ value_set <- cast_or_parse(value_set, x_type),
+ silent = !getOption("arrow.debug", FALSE)
Review Comment:
I added this while I was in here because one of my initial thoughts was that
we were trying to cast to dictionary and it was failing, but the error was
being swallowed. It turned out that it was in fact casting to dictionary but
that wasn't what was needed.
--
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]