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: reinstate find_df_window_func #13708

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andygrove
Copy link
Member

@andygrove andygrove commented Dec 9, 2024

Which issue does this PR close?

Related to #13702

Rationale for this change

Public API function find_df_window_func was removed in #13201. It would be better to deprecate it and remove it in a future release.

What changes are included in this PR?

Add deprecated method.

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the logical-expr Logical plan and expressions label Dec 9, 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 @andygrove

@@ -840,6 +840,12 @@ impl WindowFunction {
}
}

/// Find DataFusion's built-in window function by name.
#[deprecated(since = "44.0.0", note = "built-in window functions have been removed")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we give a hint about the best replacement API?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll have to research what the replacement API is first, but yes, that would be good. Once I have Comet tests passing, I will come back and improve this.

Comment on lines +845 to +846
pub fn find_df_window_func(_name: &str) -> Option<WindowFunctionDefinition> {
None
Copy link
Member

Choose a reason for hiding this comment

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

As someone who did upgrades, I'd appreciate a compiler error more than a dummy implementation.

But we can do good here. We can see what's the name being looked up and return non-built-in implementation based on that. The return type allows to do this, fortunately.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense. I am moving this to draft until I can implement the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logical-expr Logical plan and expressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants