| 2163 | } |
| 2164 | |
| 2165 | ExecBatch Project(JoinType join_type, const ExecBatch& batch) const { |
| 2166 | std::vector<Datum> values; |
| 2167 | if (join_type != JoinType::RIGHT_SEMI && join_type != JoinType::RIGHT_ANTI) { |
| 2168 | for (int i : left_output) { |
| 2169 | values.push_back(batch[i]); |
| 2170 | } |
| 2171 | } |
| 2172 | if (join_type != JoinType::LEFT_SEMI && join_type != JoinType::LEFT_ANTI) { |
| 2173 | int left_size = |
| 2174 | join_type == JoinType::RIGHT_SEMI || join_type == JoinType::RIGHT_ANTI |
| 2175 | ? 0 |
| 2176 | : left->num_fields(); |
| 2177 | for (int i : right_output) { |
| 2178 | values.push_back(batch[left_size + i]); |
| 2179 | } |
| 2180 | } |
| 2181 | return {std::move(values), batch.length}; |
| 2182 | } |
| 2183 | }; |
| 2184 | |
| 2185 | Projector GetProjector(std::vector<int> left_output, std::vector<int> right_output) { |
no test coverage detected