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 CanonicalPlanGenerate to canonicalize without plan ID #22033

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

jaystarshot
Copy link
Member

@jaystarshot jaystarshot commented Feb 27, 2024

Description

Fixes first part of #21449. Would need to canonicalize repeated variables for part2

Motivation and Context

Impact

Test Plan

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* Fix plan canonicalization by canonicalizing plan node ids.

@jaystarshot jaystarshot changed the title Fix CanonicalPlanGenerate to canonicalize plans without the plan ID Fix CanonicalPlanGenerate to canonicalize without plan ID Feb 27, 2024
@jaystarshot jaystarshot marked this pull request as ready for review February 27, 2024 22:20
@jaystarshot jaystarshot requested a review from a team as a code owner February 27, 2024 22:20
Copy link
Contributor

@pranjalssh pranjalssh left a comment

Choose a reason for hiding this comment

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

Can you check if it doesn't affect fragment result code as well which uses this codepath

@jaystarshot
Copy link
Member Author

jaystarshot commented Mar 1, 2024

It can because they creates a plan canonical generator there too.

https://github.com/prestodb/presto/blob/master/presto-main/src/main/java/com/facebook/presto/sql/planner/CanonicalPlanGenerator.java#L131.

If we are not sure about the impact there we could not allow this for default strategy.

@pranjalssh
Copy link
Contributor

pranjalssh commented Mar 1, 2024

@jaystarshot that is safer to do without going into more details.

Ideally, we should refactor this class so default strategy goes in a different class, and we reuse some parts from that class here.

@jaystarshot jaystarshot merged commit aadfba5 into prestodb:master Mar 4, 2024
56 checks passed
@wanglinsong wanglinsong mentioned this pull request May 1, 2024
48 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants