| 133 | } |
| 134 | |
| 135 | RowTypePtr getNonPartitionsColumns( |
| 136 | const std::vector<std::string>& partitionedKeys, |
| 137 | const RowTypePtr& rowType) { |
| 138 | std::vector<std::string> dataColumnNames; |
| 139 | std::vector<TypePtr> dataColumnTypes; |
| 140 | for (auto i = 0; i < rowType->size(); i++) { |
| 141 | auto name = rowType->names()[i]; |
| 142 | if (std::find(partitionedKeys.cbegin(), partitionedKeys.cend(), name) == |
| 143 | partitionedKeys.cend()) { |
| 144 | dataColumnNames.emplace_back(name); |
| 145 | dataColumnTypes.emplace_back(rowType->findChild(name)); |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | return ROW(std::move(dataColumnNames), std::move(dataColumnTypes)); |
| 150 | } |
| 151 | |
| 152 | FOLLY_ALWAYS_INLINE std::ostream& operator<<(std::ostream& os, TestMode mode) { |
| 153 | os << testModeString(mode); |