Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

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

* fix the code style

* format update
  • Loading branch information
JkSelf authored Apr 6, 2021
1 parent 1441bcf commit 37b1293
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 37b1293

Please sign in to comment.