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

Minor: fix: #9010 - Optimizer schema change assert error is incorrect #9012

Merged
merged 2 commits into from
Jan 26, 2024

Conversation

curtisleefulton
Copy link
Contributor

Which issue does this PR close?

This is one-line fix: The assert_schema_is_the_same error will now report prev_plan / new_plan in the correct order.

Closes #9010.

Rationale for this change

When debugging logical plan optimization change errors, it's important to know the correct values of prev_plan / new_plan so further investigation is can move quickly.

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

No. This change will not affect the API.

No. This change will not affect the API.

@github-actions github-actions bot added the optimizer Optimizer rules label Jan 26, 2024
@curtisleefulton curtisleefulton changed the title fix: #9010 - Optimizer schema change assert error has incorrect error fix: #9010 - Optimizer schema change assert error is incorrect Jan 26, 2024
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 @curtisleefulton -- nice find

@@ -294,7 +294,7 @@ impl Optimizer {
self.optimize_recursively(rule, &new_plan, config)
.and_then(|plan| {
if let Some(plan) = &plan {
assert_schema_is_the_same(rule.name(), &new_plan, plan)?;
assert_schema_is_the_same(rule.name(), plan, &new_plan)?;
Copy link
Contributor

Choose a reason for hiding this comment

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

@alamb alamb changed the title fix: #9010 - Optimizer schema change assert error is incorrect Minor: fix: #9010 - Optimizer schema change assert error is incorrect Jan 26, 2024
@alamb
Copy link
Contributor

alamb commented Jan 26, 2024

Thanks @curtisleefulton ❤️

@alamb alamb merged commit fc75255 into apache:main Jan 26, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimizer Optimizer rules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimizer schema change assert error has incorrect error
2 participants