From d103dbdc188174668306ee26e6ed3b2b7e9dc5b2 Mon Sep 17 00:00:00 2001 From: Tao He Date: Thu, 28 Oct 2021 15:42:38 +0800 Subject: [PATCH] Fixes backwards compatible with lower-version of apache-arrow. (#561) Fixes compatible bug that introduced in #559. Signed-off-by: Tao He --- modules/basic/ds/arrow_utils.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/basic/ds/arrow_utils.cc b/modules/basic/ds/arrow_utils.cc index 7c97c4d8..23a142af 100644 --- a/modules/basic/ds/arrow_utils.cc +++ b/modules/basic/ds/arrow_utils.cc @@ -260,8 +260,12 @@ Status EmptyTableBuilder::Build(const std::shared_ptr& schema, } std::shared_ptr EmptyTableBuilder::EmptySchema() { +#if defined(ARROW_VERSION) && ARROW_VERSION >= 4000000 return std::shared_ptr( new arrow::Schema({}, arrow::Endianness::Native)); +#else + return std::shared_ptr(new arrow::Schema({})); +#endif } std::shared_ptr type_name_to_arrow_type(