Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-18205

[C++] Substrait consumer is not converting right side references correctly on joins

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 11.0.0
    • C++

    Description

      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)).

      Attachments

        Issue Links

          Activity

            People

              vibhatha Vibhatha Lakmal Abeykoon
              westonpace Weston Pace
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m