Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Physical planner makes assumption that join keys are specified in left = right order #4795

Closed
andygrove opened this issue Jan 3, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@andygrove
Copy link
Member

andygrove commented Jan 3, 2023

Describe the bug

The following code fails for TPC-DS query 10 because the join keys are not in the expected order.

                    let join_on = keys
                        .iter()
                        .map(|(l, r)| {
                            let l = l.try_into_col()?;
                            let r = r.try_into_col()?;
                            Ok((
                                Column::new(&l.name, left_df_schema.index_of_column(&l)?),
                                Column::new(&r.name, right_df_schema.index_of_column(&r)?),
                            ))
                        })
                        .collect::<Result<join_utils::JoinOn>>()?;

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
Add any other context about the problem here.

@andygrove
Copy link
Member Author

It looks like the logical plan builder should always put the columns in the correct order but this is not happening in some cases .. the fix should probably be in the logical plan builder and not the physical planner

@jackwener
Copy link
Member

related issue #4688

@askoa
Copy link
Contributor

askoa commented Jan 12, 2023

Edit: The issue described in this comment is unrelated to the OG issue. Hence I removed the comment and created a new ticket. Please see #4887.

@Dandandan
Copy link
Contributor

I think this has been resolved @andygrove please reopen if this is not the case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants