File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
datafusion/physical-plan/src/joins Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1016,8 +1016,15 @@ impl ExecutionPlan for HashJoinExec {
10161016 let references_right_columns = referenced_columns
10171017 . iter ( )
10181018 . any ( |col| right_column_names. contains ( col. name ( ) ) ) ;
1019+ // Some join types produce extra columns, e.g. `mark` columns in RightMark joins or LeftMark joins.
1020+ let references_non_child_columns = referenced_columns
1021+ . iter ( )
1022+ . any ( |col| {
1023+ !left_column_names. contains ( col. name ( ) )
1024+ && !right_column_names. contains ( col. name ( ) )
1025+ } ) ;
10191026
1020- if references_left_columns && references_right_columns {
1027+ if references_non_child_columns || ( references_left_columns && references_right_columns) {
10211028 // Filter references both sides - cannot push down, skip it
10221029 left_filters. push ( PredicateSupport :: Unsupported ( Arc :: clone ( filter) ) ) ;
10231030 right_filters. push ( PredicateSupport :: Unsupported ( Arc :: clone ( filter) ) ) ;
You can’t perform that action at this time.
0 commit comments