apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.62k stars 802 forks source link

Add support for Utf8View -> numeric in can_cast_types #6715

Closed Omega359 closed 6 days ago

Omega359 commented 1 week ago

Describe the bug

It looks like utf8View -> numeric support is available in cast_with_options however can_cast_types does not reflect that.

can_cast_types should be gone over closely to verify it reflects what is actually supported wrt Utf8Views

To Reproduce

Done via DF's slt tests

query B
select arrow_cast(arrow_cast('1', 'Utf8View'), 'Int32') < 2;
----
true

DataFusion error: This feature is not implemented: Unsupported CAST from Utf8View to Int32

Expected behavior

This should work as expected

Additional context

tlm365 commented 1 week ago

take