my-vegetable-has-exploded commented on code in PR #9236:
URL: https://github.com/apache/arrow-datafusion/pull/9236#discussion_r1515381369
##########
datafusion/physical-plan/src/joins/hash_join.rs:
##########
@@ -406,6 +421,34 @@ impl HashJoinExec {
JoinSide::Right
}
+ /// Return whether the join contains a projection
+ pub fn contain_projection(&self) -> bool {
+ self.projection.is_some()
+ }
+
+ /// Return new instance of [HashJoinExec] with the given projection.
+ pub fn with_projection(&self, projection: Option<Vec<usize>>) ->
Result<Self> {
+ // check if the projection is valid
+ datafusion_common::utils::can_project(&self.schema,
projection.as_ref())?;
Review Comment:
> Shouldn't it be can_project against `self.schema()` then? Otherwise
"layering" projections over each other could potentially panic at L435 if I'm
not mistaken.
Right. I neglected it when I merged the codeðŸ˜.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]