You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mapleFU (via GitHub)" <gi...@apache.org> on 2025/02/05 13:15:35 UTC

[I] [C++] Scalar::CastTo for ListView unimplemented [arrow]

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-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Scalar::CastTo for ListView unimplemented [arrow]

Posted by "thisisnic (via GitHub)" <gi...@apache.org>.
thisisnic closed issue #45430: [C++] Scalar::CastTo for ListView unimplemented
URL: https://github.com/apache/arrow/issues/45430


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [C++] Scalar::CastTo for ListView unimplemented [arrow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #45430:
URL: https://github.com/apache/arrow/issues/45430#issuecomment-4459484991

   This issue has been marked as stale because it has had no activity in the past 365 days. Please remove the stale label or comment below, or this issue will be closed in 14 days. If this improvement is still desired but has no current owner, please add the 'Status: needs champion' label.


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org