Jonathan Keane created ARROW-16172:
--------------------------------------

             Summary: [C++] cast when reasonable for join keys
                 Key: ARROW-16172
                 URL: https://issues.apache.org/jira/browse/ARROW-16172
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
            Reporter: Jonathan Keane


Joining an integer column with a float column that happens to have whole 
numbers errors. For kernels, we would autocast in this circumstance, so it's a 
surprising UX that this doesn't work + I need to type coerce on my own for this.

{code}
library(arrow, warn.conflicts = FALSE)
#> See arrow_info() for available features
library(dplyr, warn.conflicts = FALSE)

tab_int <- arrow_table(data.frame(let = letters, num = 1L:26L))
tab_float <- arrow_table(data.frame(let = letters, num = as.double(1:26)))

left_join(tab_int, tab_float) %>% collect()
#> Error in `handle_csv_read_error()`:
#> ! Invalid: Incompatible data types for corresponding join field keys: 
FieldRef.Name(num) of type int32 and FieldRef.Name(num) of type double
{code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to