diff --git a/cpp/src/arrow/c/bridge.cc b/cpp/src/arrow/c/bridge.cc index 71f35406bda35..92e57c338c139 100644 --- a/cpp/src/arrow/c/bridge.cc +++ b/cpp/src/arrow/c/bridge.cc @@ -2622,7 +2622,7 @@ class AsyncRecordBatchIterator { private_data->fut_iterator_.MarkFinished(maybe_schema.status()); return EINVAL; } - + private_data->state_->schema_ = maybe_schema.MoveValueUnsafe(); private_data->fut_iterator_.MarkFinished(private_data->state_); self->producer->request(self->producer, @@ -2783,7 +2783,8 @@ struct AsyncProducer { } static int extract_data(struct ArrowAsyncTask* task, struct ArrowDeviceArray* out) { - std::unique_ptr private_data{reinterpret_cast(task->private_data)}; + std::unique_ptr private_data{ + reinterpret_cast(task->private_data)}; int ret = 0; if (out != nullptr) { auto status = ExportDeviceRecordBatch(*private_data->record_, @@ -2793,7 +2794,7 @@ struct AsyncProducer { private_data->producer_->error_ = status; } } - + return ret; } diff --git a/cpp/src/arrow/c/bridge.h b/cpp/src/arrow/c/bridge.h index 84761ae310e9b..78860e0650e74 100644 --- a/cpp/src/arrow/c/bridge.h +++ b/cpp/src/arrow/c/bridge.h @@ -412,8 +412,8 @@ Result> ImportDeviceChunkedArray( /// /// @{ -/// \brief EXPERIMENTAL: AsyncErrorDetail is a StatusDetail that contains an error code and message -/// from an asynchronous operation. +/// \brief EXPERIMENTAL: AsyncErrorDetail is a StatusDetail that contains an error code +/// and message from an asynchronous operation. class AsyncErrorDetail : public StatusDetail { public: AsyncErrorDetail(int code, std::string message, std::string metadata) @@ -444,8 +444,8 @@ namespace internal { class Executor; } -/// \brief EXPERIMENTAL: Create an AsyncRecordBatchReader and populate a corresponding handler to pass -/// to a producer +/// \brief EXPERIMENTAL: Create an AsyncRecordBatchReader and populate a corresponding +/// handler to pass to a producer /// /// The ArrowAsyncDeviceStreamHandler struct is intended to have its callbacks populated /// and then be passed to a producer to call the appropriate callbacks when data is ready. @@ -464,7 +464,8 @@ Future CreateAsyncDeviceStreamHandler( struct ArrowAsyncDeviceStreamHandler* handler, internal::Executor* executor, uint64_t queue_size = 5, DeviceMemoryMapper mapper = DefaultDeviceMemoryMapper); -/// \brief EXPERIMENTAL: Export an AsyncGenerator of record batches using a provided handler +/// \brief EXPERIMENTAL: Export an AsyncGenerator of record batches using a provided +/// handler /// /// This function calls the callbacks on the consumer-provided async handler as record /// batches become available from the AsyncGenerator which is provided. It will first call