| 1308 | } |
| 1309 | |
| 1310 | static inline Result<col_index_t> FindColIndex(const Schema& schema, |
| 1311 | const FieldRef& field_ref, |
| 1312 | std::string_view key_kind) { |
| 1313 | auto match_res = field_ref.FindOne(schema); |
| 1314 | if (!match_res.ok()) { |
| 1315 | return Status::Invalid("Bad join key on table : ", match_res.status().message()); |
| 1316 | } |
| 1317 | ARROW_ASSIGN_OR_RAISE(auto match, match_res); |
| 1318 | if (match.indices().size() != 1) { |
| 1319 | return Status::Invalid("AsOfJoinNode does not support a nested ", key_kind, "-key ", |
| 1320 | field_ref.ToString()); |
| 1321 | } |
| 1322 | return match.indices()[0]; |
| 1323 | } |
| 1324 | |
| 1325 | static Result<size_t> GetByKeySize( |
| 1326 | const std::vector<asofjoin::AsofJoinKeys>& input_keys) { |