raulcd commented on PR #45189:
URL: https://github.com/apache/arrow/pull/45189#issuecomment-2575443307

   The cython2 failure is related:
   ```
     In file included from /build/python/pyarrow/src/arrow/python/async.h:22,
                      from 
/build/python/build/temp.linux-x86_64-cpython-310/_parquet.cpp:830:
     /build/python/pyarrow/src/arrow/python/common.h: In instantiation of 
'arrow::py::SmartPtrNoGIL<SmartPtr, Ts>& arrow::py::SmartPtrNoGIL<SmartPtr, 
Ts>::operator=(V&&) [with V = std::unique_ptr<arrow::RecordBatchReader>&; 
SmartPtr = std::unique_ptr; Ts = {arrow::RecordBatchReader}]':
     /build/python/build/temp.linux-x86_64-cpython-310/_parquet.cpp:25556:56:   
required from here
     /build/python/pyarrow/src/arrow/python/common.h:263:20: error: use of 
deleted function 'std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, 
_Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&) [with _Tp = 
arrow::RecordBatchReader; _Dp = std::default_delete<arrow::RecordBatchReader>]'
       263 |     Base::operator=(std::forward<V>(v));
           |     ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
     In file included from 
/opt/conda/envs/arrow/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/memory:78,
                      from 
/build/python/build/temp.linux-x86_64-cpython-310/_parquet.cpp:770:
     
/opt/conda/envs/arrow/lib/gcc/x86_64-conda-linux-gnu/13.3.0/include/c++/bits/unique_ptr.h:523:19:
 note: declared here
       523 |       unique_ptr& operator=(const unique_ptr&) = delete;
           |                   ^~~~~~~~
   ```
   the following patch would work but I don't think this should be the fix, as 
I am pretty sure `std::forward` should be used here for other operators:
   ```diff
   diff --git a/python/pyarrow/src/arrow/python/common.h 
b/python/pyarrow/src/arrow/python/common.h
   index 4a7886695e..30acf0d6ed 100644
   --- a/python/pyarrow/src/arrow/python/common.h
   +++ b/python/pyarrow/src/arrow/python/common.h
   @@ -260,7 +260,7 @@ class SmartPtrNoGIL : public SmartPtr<Ts...> {
      template <typename V>
      SmartPtrNoGIL& operator=(V&& v) {
        auto release_guard = optional_gil_release();
   -    Base::operator=(std::forward<V>(v));
   +    Base::operator=(std::move(v));
        return *this;
      }
   ```


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

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

Reply via email to