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

Function AssertTablesEqualIgnoringOrder

cpp/src/arrow/dataset/test_util_internal.cc:157–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157void AssertTablesEqualIgnoringOrder(const std::shared_ptr<Table>& exp,
158 const std::shared_ptr<Table>& act) {
159 ASSERT_EQ(exp->num_columns(), act->num_columns());
160 if (exp->num_rows() == 0) {
161 ASSERT_EQ(exp->num_rows(), act->num_rows());
162 } else {
163 ASSERT_OK_AND_ASSIGN(auto exp_sorted, SortTableOnAllFields(exp));
164 ASSERT_OK_AND_ASSIGN(auto act_sorted, SortTableOnAllFields(act));
165
166 AssertTablesEqual(*exp_sorted, *act_sorted,
167 /*same_chunk_layout=*/false, /*flatten=*/true);
168 }
169}
170
171void AssertExecBatchesEqualIgnoringOrder(const std::shared_ptr<Schema>& schema,
172 const std::vector<ExecBatch>& exp,

Callers 1

Calls 3

AssertTablesEqualFunction · 0.85
num_columnsMethod · 0.45
num_rowsMethod · 0.45

Tested by

no test coverage detected