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

Method Project

cpp/src/arrow/acero/hash_join_node_test.cc:2165–2182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

TESTFunction · 0.45

Calls 2

push_backMethod · 0.80
num_fieldsMethod · 0.45

Tested by

no test coverage detected