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
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
reinstate find_df_window_func
  • Loading branch information
andygrove committed Dec 9, 2024
commit b15767ee69f54c6953f353bbf933e560982cebb6
6 changes: 6 additions & 0 deletions datafusion/expr/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.

pub fn find_df_window_func(_name: &str) -> Option<WindowFunctionDefinition> {
None
Comment on lines +845 to +846
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.

}

/// EXISTS expression
#[derive(Clone, PartialEq, Eq, PartialOrd, Hash, Debug)]
pub struct Exists {
Expand Down
Loading