Skip to content

Commit

Permalink
feat: support for NestedLoopJoinExec in datafusion-proto (#6902)
Browse files Browse the repository at this point in the history
  • Loading branch information
r4ntix authored Jul 11, 2023
1 parent d23e48f commit 4e2a72f
Show file tree
Hide file tree
Showing 5 changed files with 333 additions and 3 deletions.
20 changes: 20 additions & 0 deletions datafusion/core/src/physical_plan/joins/nested_loop_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,26 @@ impl NestedLoopJoinExec {
metrics: Default::default(),
})
}

/// left (build) side which gets hashed
pub fn left(&self) -> &Arc<dyn ExecutionPlan> {
&self.left
}

/// right (probe) side which are filtered by the hash table
pub fn right(&self) -> &Arc<dyn ExecutionPlan> {
&self.right
}

/// Filters applied before join output
pub fn filter(&self) -> Option<&JoinFilter> {
self.filter.as_ref()
}

/// How the join is performed
pub fn join_type(&self) -> &JoinType {
&self.join_type
}
}

impl DisplayAs for NestedLoopJoinExec {
Expand Down
8 changes: 8 additions & 0 deletions datafusion/proto/proto/datafusion.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,7 @@ message PhysicalPlanNode {
UnionExecNode union = 19;
ExplainExecNode explain = 20;
SortPreservingMergeExecNode sort_preserving_merge = 21;
NestedLoopJoinExecNode nested_loop_join = 22;
}
}

Expand Down Expand Up @@ -1380,6 +1381,13 @@ message SortPreservingMergeExecNode {
int64 fetch = 3;
}

message NestedLoopJoinExecNode {
PhysicalPlanNode left = 1;
PhysicalPlanNode right = 2;
JoinType join_type = 3;
JoinFilter filter = 4;
}

message CoalesceBatchesExecNode {
PhysicalPlanNode input = 1;
uint32 target_batch_size = 2;
Expand Down
159 changes: 159 additions & 0 deletions datafusion/proto/src/generated/pbjson.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion datafusion/proto/src/generated/prost.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4e2a72f

Please sign in to comment.