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

chore: cleanup deprecated API since version <= 40 #15027

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

qazxcdswe123
Copy link
Contributor

Maybe it would be a good time to go remove any deprecated functions from 41 or earlier 🤔

Originally posted by @alamb in #15016 (comment)

removed all API that are deprecated since version <= 40

@github-actions github-actions bot added logical-expr Logical plan and expressions optimizer Optimizer rules core Core DataFusion crate common Related to common crate labels Mar 5, 2025
@qazxcdswe123 qazxcdswe123 force-pushed the cleanup-deprecation branch from 26f87ea to 9653098 Compare March 5, 2025 14:18
@alamb
Copy link
Contributor

alamb commented Mar 5, 2025

😍 thank you

@qazxcdswe123 qazxcdswe123 force-pushed the cleanup-deprecation branch from 9653098 to d0947f1 Compare March 5, 2025 15:04
@@ -329,19 +311,10 @@ fn optimize_plan_node(
config: &dyn OptimizerConfig,
) -> Result<Transformed<LogicalPlan>> {
if rule.supports_rewrite() {
return rule.rewrite(plan, config);
rule.rewrite(plan, config)
} else {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

potential semanic change here

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we please make this return an internal error rather than silently error?

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually thinking about this more I think we should simply always call rule.rewrite now (as it is required to implement now)

I am sorry about this @qazxcdswe123 but could you maybe revert the changes to OptimizerRule in this PR (and we can work on that in a follow on PR?)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

How should the Optimizer part behave? Should it just rule.rewrite, I think some of the comment is also out of date then

alamb
alamb previously approved these changes Mar 5, 2025
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.

Very nice 🧹

@alamb alamb dismissed their stale review March 5, 2025 15:23

missed the semantic change

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

lgtm thanks @qazxcdswe123
@alamb I'm feeling that having removed the deprecated code and not having migration instructions in Migration guide it would be quite a challenge to migrate from version 39 to 46 as we do not keep any traces/hints how API evolved and what is the new API

@alamb
Copy link
Contributor

alamb commented Mar 5, 2025

lgtm thanks @qazxcdswe123 @alamb I'm feeling that having removed the deprecated code and not having migration instructions in Migration guide it would be quite a challenge to migrate from version 39 to 46 as we do not keep any traces/hints how API evolved and what is the new API

In my opinion any additional small burden related to this API removal (of APIs that have been deprecated for 6 months) is likely tiny compared to all the other major changes.

Thus I don't think adding a migration guide adds much value here -- the fact the compiler has been telling people for months it is deprecated is the migration guide

One exception is the optmizer part, which will be addressed in another
commit
@qazxcdswe123 qazxcdswe123 force-pushed the cleanup-deprecation branch from d0947f1 to f37f8b0 Compare March 6, 2025 09:10
@github-actions github-actions bot removed the optimizer Optimizer rules label Mar 6, 2025
Copy link
Contributor

@zhuqi-lucas zhuqi-lucas left a comment

Choose a reason for hiding this comment

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

Thanks, lgtm.

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 @qazxcdswe123 and @comphead @zhuqi-lucas 🧹

qazxcdswe123 added a commit to qazxcdswe123/datafusion that referenced this pull request Mar 6, 2025
qazxcdswe123 added a commit to qazxcdswe123/datafusion that referenced this pull request Mar 6, 2025
@alamb
Copy link
Contributor

alamb commented Mar 6, 2025

🚀

@alamb alamb merged commit 87f1e91 into apache:main Mar 6, 2025
24 checks passed
@alamb
Copy link
Contributor

alamb commented Mar 6, 2025

Thank you @qazxcdswe123

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 logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants