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

Function AssertTablesEqualIgnoringOrder

cpp/src/arrow/engine/substrait/test_util.cc:73–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73void AssertTablesEqualIgnoringOrder(const std::shared_ptr<Table>& exp,
74 const std::shared_ptr<Table>& act) {
75 ASSERT_EQ(exp->num_columns(), act->num_columns());
76 if (exp->num_rows() == 0) {
77 ASSERT_EQ(exp->num_rows(), act->num_rows());
78 } else {
79 ASSERT_OK_AND_ASSIGN(auto exp_sorted, SortTableOnAllFields(exp));
80 ASSERT_OK_AND_ASSIGN(auto act_sorted, SortTableOnAllFields(act));
81
82 AssertTablesEqual(*exp_sorted, *act_sorted,
83 /*same_chunk_layout=*/false, /*flatten=*/true);
84 }
85}
86
87} // namespace engine
88} // namespace arrow

Callers 2

CheckRoundTripResultFunction · 0.70
TESTFunction · 0.70

Calls 3

AssertTablesEqualFunction · 0.85
num_columnsMethod · 0.45
num_rowsMethod · 0.45

Tested by

no test coverage detected