| 1353 | } |
| 1354 | |
| 1355 | static Result<std::vector<std::vector<col_index_t>>> GetIndicesOfByKey( |
| 1356 | const std::vector<std::shared_ptr<Schema>>& input_schema, |
| 1357 | const std::vector<asofjoin::AsofJoinKeys>& input_keys) { |
| 1358 | if (input_schema.size() != input_keys.size()) { |
| 1359 | return Status::Invalid("mismatching number of input schema and keys"); |
| 1360 | } |
| 1361 | ARROW_ASSIGN_OR_RAISE(size_t n_by, GetByKeySize(input_keys)); |
| 1362 | size_t n_input = input_schema.size(); |
| 1363 | std::vector<std::vector<col_index_t>> indices_of_by_key( |
| 1364 | n_input, std::vector<col_index_t>(n_by)); |
| 1365 | for (size_t i = 0; i < n_input; ++i) { |
| 1366 | for (size_t k = 0; k < n_by; k++) { |
| 1367 | const auto& by_key = input_keys[i].by_key; |
| 1368 | ARROW_ASSIGN_OR_RAISE(indices_of_by_key[i][k], |
| 1369 | FindColIndex(*input_schema[i], by_key[k], "by")); |
| 1370 | } |
| 1371 | } |
| 1372 | return indices_of_by_key; |
| 1373 | } |
| 1374 | |
| 1375 | static arrow::Result<ExecNode*> Make(ExecPlan* plan, std::vector<ExecNode*> inputs, |
| 1376 | const ExecNodeOptions& options) { |
nothing calls this directly
no test coverage detected