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

[NSE-229] Fix the deprecated code warning in shuffle_split_test #230

Merged
merged 3 commits into from
Apr 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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