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

fix bugs explain with non-correlated query #13210

Merged
merged 6 commits into from
Nov 5, 2024
Merged

Conversation

Lordworms
Copy link
Contributor

Which issue does this PR close?

Closes #5265

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added physical-expr Physical Expressions core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels Oct 31, 2024
.push(StringifiedPlan::new(InitialPhysicalPlan, e.to_string())),
Err(err) => {
return Ok(Some(Arc::new(ExplainExec::new(
SchemaRef::new(Schema::new(vec![arrow_schema::Field::new(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change means that the explain will not have the logical plan, but instead will have only the error message for creating the physical plan as the "Final Logical Plan"

@alamb
Copy link
Contributor

alamb commented Nov 3, 2024

I merged up from main to try and get the CI passing (I won't force push this PR again!)

@@ -1797,11 +1797,19 @@ impl DefaultPhysicalPlanner {
Err(e) => return Err(e),
}
}
Err(e) => stringified_plans
.push(StringifiedPlan::new(InitialPhysicalPlan, e.to_string())),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I played around with this some more this morning -- I think the reason the error isn't displayed is that InitialPhysicalPlan is not shown by default in explain plans.

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Lordworms -- I played around with this and I think I found another way to do it:

Lordworms#2

Let me know what you think!

@github-actions github-actions bot added common Related to common crate proto Related to proto crate labels Nov 3, 2024
@Lordworms
Copy link
Contributor Author

Thank you @Lordworms -- I played around with this and I think I found another way to do it:

Lordworms#2

Let me know what you think!

Thanks a lot!

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Lordworms 🚀

@alamb alamb merged commit e8520ab into apache:main Nov 5, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Related to common crate core Core DataFusion crate physical-expr Physical Expressions proto Related to proto crate sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some In/Exists Subqueries will generate wrong PhysicalPlan
2 participants