MCPcopy Create free account
hub / github.com/apache/arrow / CheckTakeIndicesCase

Function CheckTakeIndicesCase

cpp/src/arrow/compute/kernels/vector_selection_test.cc:79–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void CheckTakeIndicesCase(const BooleanArray& filter,
80 const std::shared_ptr<Array>& expected_indices,
81 FilterOptions::NullSelectionBehavior null_selection) {
82 ASSERT_OK_AND_ASSIGN(auto indices,
83 internal::GetTakeIndices(*filter.data(), null_selection));
84 auto indices_array = MakeArray(indices);
85 ValidateOutput(indices);
86 AssertArraysEqual(*expected_indices, *indices_array, /*verbose=*/true);
87
88 ASSERT_OK_AND_ASSIGN(auto ree_filter, REEncode(filter));
89 ASSERT_OK_AND_ASSIGN(auto indices_from_ree,
90 internal::GetTakeIndices(*ree_filter->data(), null_selection));
91 auto indices_from_ree_array = MakeArray(indices);
92 ValidateOutput(indices_from_ree);
93 AssertArraysEqual(*expected_indices, *indices_from_ree_array, /*verbose=*/true);
94}
95
96void CheckTakeIndicesCase(const std::string& filter_json, const std::string& indices_json,
97 FilterOptions::NullSelectionBehavior null_selection,

Callers 1

TESTFunction · 0.85

Calls 4

ValidateOutputFunction · 0.85
AssertArraysEqualFunction · 0.85
ArrayFromJSONFunction · 0.85
MakeArrayFunction · 0.70

Tested by

no test coverage detected