It would be nice to allow joining between different data types when upcast is safe, for example i{8,16,32}->i64, u{8,16,32}->u64 etc
Example:
dfI32 = pl.DataFrame({'a': [1,2,3], 'b': list('abc')}).cast({'a': pl.Int32})
dfI64 = pl.DataFrame({'a': [1,2,3], 'c': list('def')})
dfI64.join(dfI32, on='a') # a would keep Int64 type
dfI32.join(dfI64, on='a') # a would become Int64 type (or this could be depending on join type)
Currently both of these error with an exception like
ComputeError: datatypes of join keys don't match - `a`: i64 on left does not match `a`: i32 on right
This could also be a kwargs that defaults to false, so that polars by itself does no type conversion, but users can opt into safe upcasts if the want to
Description
It would be nice to allow joining between different data types when upcast is safe, for example i{8,16,32}->i64, u{8,16,32}->u64 etc
Example:
Currently both of these error with an exception like