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

Function SortTableOnAllFields

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

Source from the content-addressed store, hash-verified

61namespace engine {
62
63Result<std::shared_ptr<Table>> SortTableOnAllFields(const std::shared_ptr<Table>& tab) {
64 std::vector<SortKey> sort_keys;
65 for (int i = 0; i < tab->num_columns(); i++) {
66 sort_keys.emplace_back(i);
67 }
68 ARROW_ASSIGN_OR_RAISE(auto sort_ids, SortIndices(tab, SortOptions(sort_keys)));
69 ARROW_ASSIGN_OR_RAISE(auto tab_sorted, Take(tab, sort_ids));
70 return tab_sorted.table();
71}
72
73void AssertTablesEqualIgnoringOrder(const std::shared_ptr<Table>& exp,
74 const std::shared_ptr<Table>& act) {

Callers

nothing calls this directly

Calls 2

emplace_backMethod · 0.80
num_columnsMethod · 0.45

Tested by

no test coverage detected