kosiew commented on code in PR #23185:
URL: https://github.com/apache/datafusion/pull/23185#discussion_r3490519521
##########
datafusion/physical-plan/src/joins/hash_join/exec.rs:
##########
@@ -885,6 +885,11 @@ impl HashJoinExec {
true
}
+ /// column indices
+ pub fn column_indices(&self) -> &Vec<ColumnIndex> {
Review Comment:
I don't think we should add a new public
`HashJoinExec::column_indices(&self) -> &Vec<ColumnIndex>` API just so
projection pushdown can pass this internal join metadata to a crate-local
helper.
The follow up commit makes `try_pushdown_through_join` `pub(crate)`
specifically to avoid expanding the public API surface, so this accessor feels
a bit at odds with that goal. It also exposes the internal `Vec`
representation, which becomes part of the semver contract.
Since the call sites are within the same impl, could we just pass
`&self.column_indices` or `self.column_indices.as_slice()` directly? If an
accessor is still preferred, I think it should be `pub(crate)` and return
`&[ColumnIndex]` instead.
##########
datafusion/physical-plan/src/joins/nested_loop_join.rs:
##########
@@ -336,6 +336,11 @@ impl NestedLoopJoinExec {
.build()
}
+ /// column indices
+ pub fn column_indices(&self) -> &Vec<ColumnIndex> {
Review Comment:
Same concern here. This `NestedLoopJoinExec::column_indices(&self) ->
&Vec<ColumnIndex>` accessor is only needed by the internal projection pushdown
code, so I'd rather not expose it as a public `&Vec` API.
Could we either access the field directly from the impl or make the accessor
`pub(crate)` and have it return `&[ColumnIndex]` instead?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]