rtpsw commented on code in PR #14385:
URL: https://github.com/apache/arrow/pull/14385#discussion_r994865351


##########
cpp/src/arrow/compute/exec/asof_join_node.cc:
##########
@@ -1030,6 +1031,32 @@ class AsofJoinNode : public ExecNode {
     return match.indices()[0];
   }
 
+  static Result<std::vector<col_index_t>> GetIndicesOfOnKey(
+      const std::vector<std::shared_ptr<Schema>>& input_schema, const 
FieldRef& on_key) {
+    size_t n_input = input_schema.size();
+    std::vector<col_index_t> indices_of_on_key(n_input);
+    for (size_t i = 0; i < n_input; ++i) {
+      ARROW_ASSIGN_OR_RAISE(indices_of_on_key[i],
+                            FindColIndex(*input_schema[i], on_key, "on"));

Review Comment:
   Note that the code here already appeared in the pre-PR code, just moved a 
bit.
   
   I suspect going down the path you describe, which I'm willing to try, would 
be more complicated than you suggest because even `AsofJoinNodeOptions` does 
not currently support distinct field-references per input (be them index- or 
name- based). Therefore, I think the required fix would involve many places in 
the code (and we would normally have allocated a separate task for such a fix).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to