44 lines
1.5 KiB
Diff
44 lines
1.5 KiB
Diff
From 4bfc8d1ff53b398c8e5bd879ca32ead4321b844a Mon Sep 17 00:00:00 2001
|
|
From: Mattias Ellert <mattias.ellert@physics.uu.se>
|
|
Date: Wed, 20 Aug 2025 08:17:16 +0200
|
|
Subject: [PATCH] [df] Support libarrow 21
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
arrow::internal::GenericToStatus → arrow::ToStatus
|
|
---
|
|
tree/dataframe/test/datasource_arrow.cxx | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
diff --git a/tree/dataframe/test/datasource_arrow.cxx b/tree/dataframe/test/datasource_arrow.cxx
|
|
index 05493baa3d4..73749b59afc 100644
|
|
--- a/tree/dataframe/test/datasource_arrow.cxx
|
|
+++ b/tree/dataframe/test/datasource_arrow.cxx
|
|
@@ -12,6 +12,7 @@
|
|
#include <arrow/record_batch.h>
|
|
#include <arrow/table.h>
|
|
#include <arrow/type.h>
|
|
+#include <arrow/util/config.h>
|
|
#if defined(__GNUC__)
|
|
#pragma GCC diagnostic pop
|
|
#endif
|
|
@@ -21,9 +22,15 @@
|
|
#include <iostream>
|
|
using namespace arrow;
|
|
|
|
+#if ARROW_VERSION_MAJOR >= 21
|
|
+#define ASSERT_OK(expr) \
|
|
+ for (::arrow::Status _st = ::arrow::ToStatus((expr)); !_st.ok();) \
|
|
+ FAIL() << "'" ARROW_STRINGIFY(expr) "' failed with " << _st.ToString()
|
|
+#else
|
|
#define ASSERT_OK(expr) \
|
|
for (::arrow::Status _st = ::arrow::internal::GenericToStatus((expr)); !_st.ok();) \
|
|
FAIL() << "'" ARROW_STRINGIFY(expr) "' failed with " << _st.ToString()
|
|
+#endif
|
|
|
|
// Copied from arrow/testing/builder.h
|
|
template <typename TYPE, typename C_TYPE = typename TYPE::c_type>
|
|
--
|
|
2.50.1
|
|
|