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

Method AddLeafFields

cpp/src/arrow/compute/kernels/vector_sort.cc:1052–1069  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1050
1051 protected:
1052 void AddLeafFields(const FieldVector& fields, SortOrder order,
1053 NullPlacement null_placement) {
1054 if (fields.empty()) {
1055 return;
1056 }
1057
1058 tmp_indices_.push_back(0);
1059 for (const auto& f : fields) {
1060 const auto& type = *f->type();
1061 if (type.id() == Type::STRUCT) {
1062 AddLeafFields(type.fields(), order, null_placement);
1063 } else {
1064 sort_fields_.emplace_back(FieldPath(tmp_indices_), order, null_placement, &type);
1065 }
1066 ++tmp_indices_.back();
1067 }
1068 tmp_indices_.pop_back();
1069 }
1070
1071 void AddField(const DataType& type, const FieldPath& path, SortOrder order,
1072 NullPlacement null_placement) {

Callers

nothing calls this directly

Calls 8

FieldPathFunction · 0.85
push_backMethod · 0.80
emplace_backMethod · 0.80
backMethod · 0.80
emptyMethod · 0.45
typeMethod · 0.45
idMethod · 0.45
fieldsMethod · 0.45

Tested by

no test coverage detected