Skip to content

Commit

Permalink
Fixes backwards compatible with lower-version of apache-arrow. (#561)
Browse files Browse the repository at this point in the history
Fixes compatible bug that introduced in #559.

Signed-off-by: Tao He <linzhu.ht@alibaba-inc.com>
  • Loading branch information
sighingnow authored Oct 28, 2021
1 parent 0135c99 commit d103dbd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/basic/ds/arrow_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,12 @@ Status EmptyTableBuilder::Build(const std::shared_ptr<arrow::Schema>& schema,
}

std::shared_ptr<arrow::Schema> EmptyTableBuilder::EmptySchema() {
#if defined(ARROW_VERSION) && ARROW_VERSION >= 4000000
return std::shared_ptr<arrow::Schema>(
new arrow::Schema({}, arrow::Endianness::Native));
#else
return std::shared_ptr<arrow::Schema>(new arrow::Schema({}));
#endif
}

std::shared_ptr<arrow::DataType> type_name_to_arrow_type(
Expand Down

0 comments on commit d103dbd

Please sign in to comment.