comphead commented on code in PR #13022:
URL: https://github.com/apache/datafusion/pull/13022#discussion_r1809075234
##########
datafusion/core/src/physical_optimizer/join_selection.rs:
##########
@@ -140,20 +140,32 @@ fn swap_join_projection(
left_schema_len: usize,
right_schema_len: usize,
projection: Option<&Vec<usize>>,
+ join_type: &JoinType,
) -> Option<Vec<usize>> {
- projection.map(|p| {
- p.iter()
- .map(|i| {
- // If the index is less than the left schema length, it is
from the left schema, so we add the right schema length to it.
- // Otherwise, it is from the right schema, so we subtract the
left schema length from it.
- if *i < left_schema_len {
- *i + right_schema_len
- } else {
- *i - left_schema_len
- }
- })
- .collect()
- })
+ match join_type {
Review Comment:
👍
--
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]