Skip to content

Commit

Permalink
Make HashJoinExec::join_schema public (#12807)
Browse files Browse the repository at this point in the history
* Make HashJoinExec::join_schema public

It is needed by physical optimizers that want to replace the HashJoin with a different
type of join, as they need to replace it with an equivalent projection, but
HashJoinExec::projection could not be used to build it because it refers to
indices in HashJoinExec::join_schema.

* Replace it with an accessor
  • Loading branch information
progval authored Oct 9, 2024
1 parent c92d303 commit ffe73fe
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions datafusion/physical-plan/src/joins/hash_join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,12 @@ impl HashJoinExec {
&self.join_type
}

/// The schema after join. Please be careful when using this schema,
/// if there is a projection, the schema isn't the same as the output schema.
pub fn join_schema(&self) -> &SchemaRef {
&self.join_schema
}

/// The partitioning mode of this hash join
pub fn partition_mode(&self) -> &PartitionMode {
&self.mode
Expand Down

0 comments on commit ffe73fe

Please sign in to comment.