| 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) { |