westonpace commented on a change in pull request #11579: URL: https://github.com/apache/arrow/pull/11579#discussion_r745948529
########## File path: cpp/src/arrow/compute/exec/hash_join_node.cc ########## @@ -43,32 +43,49 @@ bool HashJoinSchema::IsTypeSupported(const DataType& type) { return is_fixed_width(id) || is_binary_like(id) || is_large_binary_like(id); } -Result<std::vector<FieldRef>> HashJoinSchema::VectorDiff(const Schema& schema, - const std::vector<FieldRef>& a, - const std::vector<FieldRef>& b) { - std::unordered_set<int> b_paths; - for (size_t i = 0; i < b.size(); ++i) { - ARROW_ASSIGN_OR_RAISE(auto match, b[i].FindOne(schema)); - b_paths.insert(match[0]); +Result<std::vector<FieldRef>> HashJoinSchema::ComputePayload( + const Schema& schema, const std::vector<FieldRef>& output, + const std::vector<FieldRef>& filter, const std::vector<FieldRef>& keys) { + // payload = (output + filter) - keys, with no duplicates Review comment: Ok. I spoke to Sasha a bit about this as well. Just to close the loop, in IR, in a join expression, field reference indices are indices into the concatenated {left_schema, right_schema} correct? So `field_ref(5)` is `left_schema[5]` if `len(left_schema) > 5` and otherwise it is `right_schema[5 - len(left_schema)]`? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org