alamb commented on code in PR #11550: URL: https://github.com/apache/datafusion/pull/11550#discussion_r1690275071
########## datafusion/expr/src/expr.rs: ########## @@ -769,7 +769,52 @@ impl fmt::Display for WindowFunctionDefinition { } } +impl From<aggregate_function::AggregateFunction> for WindowFunctionDefinition { + fn from(value: aggregate_function::AggregateFunction) -> Self { + Self::AggregateFunction(value) + } +} + +impl From<BuiltInWindowFunction> for WindowFunctionDefinition { + fn from(value: BuiltInWindowFunction) -> Self { + Self::BuiltInWindowFunction(value) + } +} + +impl From<Arc<crate::AggregateUDF>> for WindowFunctionDefinition { + fn from(value: Arc<crate::AggregateUDF>) -> Self { + Self::AggregateUDF(value) + } +} + +impl From<Arc<WindowUDF>> for WindowFunctionDefinition { + fn from(value: Arc<WindowUDF>) -> Self { + Self::WindowUDF(value) + } +} + /// Window function +/// Review Comment: ❤️ ########## datafusion/expr/src/lib.rs: ########## @@ -16,6 +16,8 @@ // under the License. // Make cheap clones clear: https://github.com/apache/datafusion/issues/11143 #![deny(clippy::clone_on_ref_ptr)] +// TODO When the deprecated trait AggregateExt is removed, remove this unstable feature. Review Comment: It seems like this feature requires nightly rust, which isn't possible for DataFusion I don't think. I'll push a commit to this PR that removes the attempt at backwards compatibility and just updated the description -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org