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

Function ValidateSelectKIndices

cpp/src/arrow/compute/kernels/select_k_test.cc:549–561  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547
548template <typename ArrayType, SortOrder order>
549void ValidateSelectKIndices(const ArrayType& array) {
550 ValidateOutput(array);
551
552 SelectKCompareForResult<ArrayType, order> compare;
553 for (uint64_t i = 1; i < static_cast<uint64_t>(array.length()); i++) {
554 using ArrowType = typename ArrayType::TypeClass;
555 using GetView = internal::GetViewType<ArrowType>;
556
557 const auto lval = GetView::LogicalValue(array.GetView(i - 1));
558 const auto rval = GetView::LogicalValue(array.GetView(i));
559 ASSERT_TRUE(compare(lval, rval));
560 }
561}
562// Base class for testing against random chunked array.
563template <typename Type, SortOrder order>
564struct TestSelectKWithChunkedArrayRandomBase : public ::testing::Test {

Callers

nothing calls this directly

Calls 3

ValidateOutputFunction · 0.85
lengthMethod · 0.45
GetViewMethod · 0.45

Tested by

no test coverage detected