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

Function CheckOrderBy

cpp/src/arrow/acero/order_by_node_test.cc:50–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50void CheckOrderBy(OrderByNodeOptions options) {
51 constexpr random::SeedType kSeed = 42;
52 constexpr int kJitterMod = 4;
53 RegisterTestNodes();
54 std::shared_ptr<Table> input = TestTable();
55 Declaration plan =
56 Declaration::Sequence({{"table_source", TableSourceNodeOptions(input)},
57 {"jitter", JitterNodeOptions(kSeed, kJitterMod)},
58 {"order_by", options}});
59 for (bool use_threads : {false, true}) {
60 QueryOptions query_options;
61 query_options.sequence_output = true;
62 query_options.use_threads = use_threads;
63 ASSERT_OK_AND_ASSIGN(std::shared_ptr<Table> actual,
64 DeclarationToTable(plan, query_options));
65
66 AssertTablesEqual(*input, *actual, /*same_chunk_layout=*/false);
67 }
68}
69
70void CheckOrderByInvalid(OrderByNodeOptions options, const std::string& message) {
71 std::shared_ptr<Table> input = TestTable();

Callers 1

TESTFunction · 0.85

Calls 7

RegisterTestNodesFunction · 0.85
TableSourceNodeOptionsFunction · 0.85
JitterNodeOptionsClass · 0.85
DeclarationToTableFunction · 0.85
AssertTablesEqualFunction · 0.85
TestTableFunction · 0.70
ASSERT_OK_AND_ASSIGNFunction · 0.70

Tested by

no test coverage detected