Weston Pace created ARROW-18205:
-----------------------------------
Summary: [C++] Substrait consumer is not converting right side
references correctly on joins
Key: ARROW-18205
URL: https://issues.apache.org/jira/browse/ARROW-18205
Project: Apache Arrow
Issue Type: Bug
Components: C++
Reporter: Weston Pace
The Substrait plan expresses a join condition as a logical expression like:
{{field(0) == field(3)}} where {{0}} and {{3}} are indices into the *combined*
schema. These are then passed down to Acero which expects:
{{HashJoinNodeOptions(std::vector<FieldRef> in_left_keys, std::vector<FieldRef>
in_right_keys)}}
However, {{in_left_keys}} are field references into the *left* schema and
{{in_right_keys}} are field references into the *right* schema.
In other words, given the above expression ({{field(0) == field(3)}} if the
schema were:
left:
key: int32
y: int32
z: int32
right:
key: int32
x: int32
Then {{in_left_keys}} should be {{field(0)}} (works correct today) and
{{in_right_keys}} should be {{field(0)}} (today we are sending in {{field(3)}}).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)