Skip to content

Add upgrade guide for PhysicalOptimizerRule::optimize_plan - #19030

Merged
adriangb merged 2 commits into
apache:mainfrom
pydantic:add-upgrade-guide-optimizer
Dec 2, 2025
Merged

Add upgrade guide for PhysicalOptimizerRule::optimize_plan#19030
adriangb merged 2 commits into
apache:mainfrom
pydantic:add-upgrade-guide-optimizer

Conversation

@adriangb

Copy link
Copy Markdown
Contributor

Closes#19029

- Session extensions via `context.session_config().extensions()`

This enables optimizer rules to access custom extensions registered with the session, which was not possible with the old `&ConfigOptions` parameter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe change to extension should be mentioned as well?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I think we just made something that was private public - is that really worth mentioning?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You’re right, the previous methods remain unchanged so from the user’s perspective nothing changes. My apologies.

@2010YOUY012010YOUY01 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thank you!

Comment threaddocs/source/library-user-guide/upgrading.md Outdated

**Who is affected:**

- Users who have implemented custom `PhysicalOptimizerRule` implementations

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

cc @zhuqi-lucas / @jcsherin , we need to make some changes for the next upgrade

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Sorry about this! At least it should be pretty mechanical and you'll have several releases...

Co-authored-by: Yongting You <2010youy01@gmail.com>
@adriangb
adriangb added this pull request to the merge queueDec 2, 2025
Merged via the queue into apache:main with commit 7b4593fDec 2, 2025
5 checks passed
adriangb added a commit to pydantic/datafusion that referenced this pull request Dec 7, 2025
adriangb added a commit to pydantic/datafusion that referenced this pull request Dec 8, 2025
adriangb added a commit to pydantic/datafusion that referenced this pull request Dec 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentationImprovements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add upgrade guide for PhysicalOptimizerRule::optimize_plan

5 participants

@adriangb@milenkovicm@zhuqi-lucas@2010YOUY01@xudong963