mapleFU opened a new issue, #45430: URL: https://github.com/apache/arrow/issues/45430
### Describe the bug, including details regarding any error messages, version, and platform. Describe the enhancement requested ```c++ random::RandomArrayGenerator gen(/*seed=*/42); auto test_identity_cast_for_type = [&gen](const std::shared_ptr<arrow::DataType>& data_type) { auto tmp_array = gen.ArrayOf(data_type, /*size=*/1, /*null_probability=*/0.0); ARROW_SCOPED_TRACE("data type = ", data_type->ToString()); ASSERT_OK_AND_ASSIGN(auto scalar, tmp_array->GetScalar(0)); ASSERT_OK_AND_ASSIGN(auto casted_scalar, scalar->CastTo(data_type)); ASSERT_TRUE(casted_scalar->Equals(*scalar)); ASSERT_TRUE(scalar->Equals(*casted_scalar)); }; for (auto& view_type: { arrow::list_view(arrow::int32()), arrow::large_list_view(arrow::int32()), }) { test_identity_cast_for_type(view_type); } ``` This would report an error when casting the type to the same type. This might not a problem since it would likely to be deprecated https://github.com/apache/arrow/issues/39182 , and Cast works well in this scenerio. ### Component(s) C++ -- 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: issues-unsubscr...@arrow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org