This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 11d286eafb GH-15254: [GLib] garrow_execute_plain_wait() checks the 
finished status (#15255)
11d286eafb is described below

commit 11d286eafb72b630baf897e619c84ecdfc6b723f
Author: Sutou Kouhei <k...@clear-code.com>
AuthorDate: Mon Jan 9 21:59:25 2023 +0900

    GH-15254: [GLib] garrow_execute_plain_wait() checks the finished status 
(#15255)
    
    
    * Closes: #15254
    
    Authored-by: Sutou Kouhei <k...@clear-code.com>
    Signed-off-by: Sutou Kouhei <k...@clear-code.com>
---
 c_glib/arrow-glib/compute.cpp | 9 +++++++--
 c_glib/arrow-glib/compute.h   | 5 +++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/c_glib/arrow-glib/compute.cpp b/c_glib/arrow-glib/compute.cpp
index 3554fdf115..41deee9b6e 100644
--- a/c_glib/arrow-glib/compute.cpp
+++ b/c_glib/arrow-glib/compute.cpp
@@ -1931,16 +1931,21 @@ garrow_execute_plan_stop(GArrowExecutePlan *plan)
 /**
  * garrow_execute_plan_wait:
  * @plan: A #GArrowExecutePlan.
+ * @error: (nullable): Return location for a #GError or %NULL.
  *
  * Waits for finishing this plan.
  *
+ * Returns: %TRUE on success, %FALSE on error.
+ *
  * Since: 6.0.0
  */
-void
-garrow_execute_plan_wait(GArrowExecutePlan *plan)
+gboolean
+garrow_execute_plan_wait(GArrowExecutePlan *plan, GError **error)
 {
   auto arrow_plan = garrow_execute_plan_get_raw(plan);
   arrow_plan->finished().Wait();
+  return garrow::check(error, arrow_plan->finished().status(),
+                       "[execute-plan][wait]");
 }
 
 
diff --git a/c_glib/arrow-glib/compute.h b/c_glib/arrow-glib/compute.h
index a9ba6c2af9..360ae3857e 100644
--- a/c_glib/arrow-glib/compute.h
+++ b/c_glib/arrow-glib/compute.h
@@ -352,8 +352,9 @@ GARROW_AVAILABLE_IN_6_0
 void
 garrow_execute_plan_stop(GArrowExecutePlan *plan);
 GARROW_AVAILABLE_IN_6_0
-void
-garrow_execute_plan_wait(GArrowExecutePlan *plan);
+gboolean
+garrow_execute_plan_wait(GArrowExecutePlan *plan,
+                         GError **error);
 
 
 GArrowCastOptions *garrow_cast_options_new(void);

Reply via email to