Skip to content

Commit

Permalink
[NSE-229] Fix the deprecated code warning in shuffle_split_test (oap-…
Browse files Browse the repository at this point in the history
…project#230)

* fix the deprecated code warning in shuffle_split_test

* fix the code style

* format update
  • Loading branch information
JkSelf authored and zhouyuan committed Apr 15, 2021
1 parent 198629c commit 097fc6f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions native-sql-engine/cpp/src/tests/shuffle_split_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/

#include <arrow/compute/api.h>
#include <arrow/datum.h>
#include <arrow/io/api.h>
#include <arrow/ipc/reader.h>
#include <arrow/ipc/util.h>
Expand Down Expand Up @@ -123,10 +124,11 @@ class SplitterTest : public ::testing::Test {

auto cntx = arrow::compute::ExecContext();
std::shared_ptr<arrow::RecordBatch> res;
auto maybe_res = arrow::compute::Take(*input_batch, *take_idx,
arrow::compute::TakeOptions{}, &cntx);
res = *std::move(maybe_res);
return res;
ARROW_ASSIGN_OR_RAISE(
arrow::Datum result,
arrow::compute::Take(arrow::Datum(input_batch), arrow::Datum(take_idx),
arrow::compute::TakeOptions{}, &cntx));
return result.record_batch();
}

arrow::Result<std::shared_ptr<arrow::ipc::RecordBatchReader>>
Expand Down

0 comments on commit 097fc6f

Please sign in to comment.