Skip to content

Commit f2635c0

Browse files
authored
Fix the build compatibility with arrow 20.0.0 (#2046)
Signed-off-by: Ye Cao <[email protected]>
1 parent 72f24cb commit f2635c0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

modules/basic/ds/arrow_utils.cc

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1432,10 +1432,16 @@ Status ConsolidateColumns(
14321432
}
14331433

14341434
// build the list array
1435+
#if defined(ARROW_VERSION) && ARROW_VERSION >= 20000000
1436+
std::shared_ptr<arrow::ArrayData> array_data = arrow::ArrayData::Make(
1437+
dtype, columns[0]->length() * columns.size(), {nullptr, data_buffer});
1438+
std::shared_ptr<arrow::Array> primitive_array = arrow::MakeArray(array_data);
1439+
#else
1440+
auto primitive_array = std::make_shared<arrow::PrimitiveArray>(
1441+
dtype, columns[0]->length() * columns.size(), data_buffer);
1442+
#endif
14351443
out = std::make_shared<arrow::FixedSizeListArray>(
1436-
list_array_dtype, columns[0]->length(),
1437-
std::make_shared<arrow::PrimitiveArray>(
1438-
dtype, columns[0]->length() * columns.size(), data_buffer));
1444+
list_array_dtype, columns[0]->length(), primitive_array);
14391445
return Status::OK();
14401446
}
14411447

src/common/util/config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818

1919
#define VINEYARD_VERSION_MAJOR 0
2020
#define VINEYARD_VERSION_MINOR 24
21-
#define VINEYARD_VERSION_PATCH 2
21+
#define VINEYARD_VERSION_PATCH 3
2222

2323
#define VINEYARD_VERSION \
2424
((VINEYARD_VERSION_MAJOR * 1000) + VINEYARD_VERSION_MINOR) * 1000 + \

0 commit comments

Comments
 (0)