You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "llama90 (via GitHub)" <gi...@apache.org> on 2023/12/03 00:32:00 UTC

[I] [C++] Add Compute Kernel for Casting from list_view to list [arrow]

llama90 opened a new issue, #39051:
URL: https://github.com/apache/arrow/issues/39051

   ### Describe the enhancement requested
   
   This is a sub-issue of the issue mentioned below.
   
   * #35560 
   
   As we can see in the parent issue, we can find tables organizing the related functions.
   
   | file name         | code snippet                                                                               |
   |-------------------|--------------------------------------------------------------------------------------------|
   | scalar_test.cc    | `EXPECT_OK_AND_ASSIGN(auto cast_scalar, scalar.CastTo(to_type));`                          |
   | scalar_test.cc    | `scalar.CastTo(to_type));`                                                                 |
   
   
   > The functions require handling "Unsupported cast from list_view<item: int16> to list using function cast_list" error.
   
   We need to implement casting from `list_view` to `list`. 
   
   
   ### 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++] Add Compute Kernel for Casting from list_view to list [arrow]

Posted by "llama90 (via GitHub)" <gi...@apache.org>.
llama90 commented on issue #39051:
URL: https://github.com/apache/arrow/issues/39051#issuecomment-1868280756

   ### Progress Update
   
   #### Fix CheckInvalidListCast for TestMapScalar
   
   I'm investigating an issue where tests pass locally (Macbook M1), but a Segmentation fault occurs in a [different environment](https://github.com/apache/arrow/actions/runs/7307958925/job/19914144901?pr=39353).
   
   <details><summary>AMD64 Conda C++ AVX2 `Log`</summary>
   
   ```
   [----------] 3 tests from TestMapScalar
   [ RUN      ] TestMapScalar.Basics
   [       OK ] TestMapScalar.Basics (0 ms)
   [ RUN      ] TestMapScalar.NullScalar
   [       OK ] TestMapScalar.NullScalar (0 ms)
   [ RUN      ] TestMapScalar.Cast
   Found core dump, printing backtrace:
   
   warning: core file may not match specified executable file.
   [New LWP 17371]
   [New LWP 17389]
   [Thread debugging using libthread_db enabled]
   Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
   Core was generated by `/build/cpp/debug/arrow-scalar-test'.
   Program terminated with signal SIGSEGV, Segmentation fault.
   #0  0x00007fb93d02c44a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release () at /opt/conda/envs/arrow/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/shared_ptr_base.h:337
   337		  if (__atomic_load_n(__both_counts, __ATOMIC_ACQUIRE) == __unique_ref)
   [Current thread is 1 (Thread 0x7fb93aba5300 (LWP 17371))]
   
   Thread 2 (Thread 0x7fb93a1ff640 (LWP 17389)):
   #0  __futex_abstimed_wait_common64 (private=0, cancel=true, abstime=0x0, op=393, expected=0, futex_word=0x7fb93a8174b0) at ./nptl/futex-internal.c:57
   #1  __futex_abstimed_wait_common (cancel=true, private=0, abstime=0x0, clockid=0, expected=0, futex_word=0x7fb93a8174b0) at ./nptl/futex-internal.c:87
   #2  __GI___futex_abstimed_wait_cancelable64 (futex_word=futex_word@entry=0x7fb93a8174b0, expected=expected@entry=0, clockid=clockid@entry=0, abstime=abstime@entry=0x0, private=private@entry=0) at ./nptl/futex-internal.c:139
   #3  0x00007fb93c8bda41 in __pthread_cond_wait_common (abstime=0x0, clockid=0, mutex=0x7fb93a817508, cond=0x7fb93a817488) at ./nptl/pthread_cond_wait.c:503
   #4  ___pthread_cond_wait (cond=cond@entry=0x7fb93a817488, mutex=mutex@entry=0x7fb93a817508) at ./nptl/pthread_cond_wait.c:627
   #5  0x00007fb93eef9e53 in background_thread_sleep (tsdn=tsdn@entry=0x7fb93a1febe0, info=info@entry=0x7fb93a817480, interval=<optimized out>) at src/background_thread.c:137
   #6  0x00007fb93eefacad in background_work_sleep_once (ind=0, info=<optimized out>, tsdn=<optimized out>) at src/background_thread.c:229
   #7  background_thread0_work (tsd=<optimized out>) at src/background_thread.c:374
   #8  background_work (ind=<optimized out>, tsd=0x7fb93a1ff618) at src/background_thread.c:412
   #9  background_thread_entry (ind_arg=<optimized out>) at src/background_thread.c:444
   #10 0x00007fb93c8beac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
   #11 0x00007fb93c94f814 in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:100
   
   Thread 1 (Thread 0x7fb93aba5300 (LWP 17371)):
   #0  0x00007fb93d02c44a in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release () at /opt/conda/envs/arrow/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/shared_ptr_base.h:337
   #1  0x00007fb93d031497 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count () at /opt/conda/envs/arrow/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/shared_ptr_base.h:1071
   #2  0x00007fb93d02c904 in std::__shared_ptr<arrow::Buffer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr () at /opt/conda/envs/arrow/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/shared_ptr_base.h:1524
   #3  0x00007fb93d087d62 in std::__shared_ptr<arrow::Buffer, (__gnu_cxx::_Lock_policy)2>::operator= () at /opt/conda/envs/arrow/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/shared_ptr_base.h:1620
   #4  0x00007fb93d087b0a in std::shared_ptr<arrow::Buffer>::operator= () at /opt/conda/envs/arrow/x86_64-conda-linux-gnu/include/c++/12.3.0/bits/shared_ptr.h:440
   #5  0x00007fb93dabbe32 in Exec () at /arrow/cpp/src/arrow/compute/kernels/scalar_cast_nested.cc:442
   #6  0x00007fb93da05d49 in ExecuteNonSpans () at /arrow/cpp/src/arrow/compute/exec.cc:920
   #7  0x00007fb93da046a1 in Execute () at /arrow/cpp/src/arrow/compute/exec.cc:810
   #8  0x00007fb93da490d6 in arrow::compute::detail::FunctionExecutorImpl::Execute () at /arrow/cpp/src/arrow/compute/function.cc:276
   #9  0x00007fb93da49eea in ExecuteInternal () at /arrow/cpp/src/arrow/compute/function.cc:341
   #10 0x00007fb93da4a060 in arrow::compute::Function::Execute () at /arrow/cpp/src/arrow/compute/function.cc:348
   #11 0x00007fb93d9f2b4d in ExecuteImpl () at /arrow/cpp/src/arrow/compute/cast.cc:124
   #12 0x00007fb93da4b434 in arrow::compute::MetaFunction::Execute () at /arrow/cpp/src/arrow/compute/function.cc:481
   #13 0x00007fb93da099ec in arrow::compute::CallFunction () at /arrow/cpp/src/arrow/compute/exec.cc:1369
   #14 0x00007fb93d9f4230 in arrow::compute::Cast () at /arrow/cpp/src/arrow/compute/cast.cc:239
   #15 0x00007fb93d9f44fc in arrow::compute::Cast () at /arrow/cpp/src/arrow/compute/cast.cc:246
   #16 0x0000557b41c8c6cd in arrow::CheckListCast<arrow::MapScalar> () at /arrow/cpp/src/arrow/scalar_test.cc:1080
   #17 0x0000557b41c6c22f in arrow::TestMapScalar_Cast_Test::TestBody () at /arrow/cpp/src/arrow/scalar_test.cc:1256
   #18 0x00007fb93ccbe149 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void> () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2607
   #19 0x00007fb93ccb5109 in testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void> () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2643
   #20 0x00007fb93cc8f5e7 in testing::Test::Run () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2682
   #21 0x00007fb93cc9009d in testing::TestInfo::Run () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2861
   #22 0x00007fb93cc90a89 in testing::TestSuite::Run () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:3015
   #23 0x00007fb93cca1251 in testing::internal::UnitTestImpl::RunAllTests () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:5855
   #24 0x00007fb93ccbf108 in testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2607
   #25 0x00007fb93ccb62f0 in testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:2643
   #26 0x00007fb93cc9f65b in testing::UnitTest::Run () at /build/cpp/_deps/googletest-src/googletest/src/gtest.cc:5438
   #27 0x00007fb93ccfe901 in RUN_ALL_TESTS () at /build/cpp/_deps/googletest-src/googletest/include/gtest/gtest.h:2490
   #28 0x00007fb93ccfe94a in main () at /build/cpp/_deps/googletest-src/googletest/src/gtest_main.cc:52
   /build/cpp/src/arrow
   ```
   
   </details>


-- 
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


Re: [I] [C++] Add Compute Kernel for Casting from list_view to list [arrow]

Posted by "llama90 (via GitHub)" <gi...@apache.org>.
llama90 commented on issue #39051:
URL: https://github.com/apache/arrow/issues/39051#issuecomment-1843992575

   ### Progress Update
   
   - [x] Support list_view to list
   - [ ] Support list_view to fixed_size_list
   


-- 
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


Re: [I] [C++] Add Compute Kernel for Casting from list_view to list [arrow]

Posted by "kou (via GitHub)" <gi...@apache.org>.
kou closed issue #39051: [C++] Add Compute Kernel for Casting from list_view to list
URL: https://github.com/apache/arrow/issues/39051


-- 
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