viirya opened a new issue, #3250: URL: https://github.com/apache/arrow-rs/issues/3250
**Describe the bug** <!-- A clear and concise description of what the bug is. --> There are more inconsistency between `can_cast_types` and `cast_with_options` that is `cast_with_options` can cast but `can_cast_types` reports `false`. For example, 1. Casting from Dictionary of Integer to DecimalArray ``` thread 'test_can_cast_types' panicked at 'Was able to cast array DictionaryArray {keys: PrimitiveArray<Int8> [ 0, 1, ] values: PrimitiveArray<Int32> [ 1, 2, ]} from Dictionary(Int8, Int32) to Decimal128(38, 0) but can_cast_types reported false', arrow/tests/array_cast.rs:83:21 ``` 2. Casting from List of some type (e.g., Integer) to Dictionary of Utf8 ``` thread 'test_can_cast_types' panicked at 'Was not able to cast array ListArray [ PrimitiveArray<Int32> [ 0, 1, 2, ], PrimitiveArray<Int32> [ 3, 4, 5, ], PrimitiveArray<Int32> [ 6, 7, ], ] from List(Field { name: "item", data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) to Dictionary(Int16, Utf8) but can_cast_types reported true. Error was CastError("Cannot cast list to non-list data types")', arrow/tests/array_cast.rs:87:21 ``` **To Reproduce** <!-- Steps to reproduce the behavior: --> **Expected behavior** <!-- A clear and concise description of what you expected to happen. --> **Additional context** <!-- Add any other context about the problem here. --> -- 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: github-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org