alamb commented on code in PR #10850:
URL: https://github.com/apache/datafusion/pull/10850#discussion_r1633289859
##########
datafusion/expr/src/logical_plan/plan.rs:
##########
@@ -2302,13 +2302,33 @@ impl Window {
window_func_dependencies.extend(new_deps);
}
- Ok(Window {
- input,
+ Self::try_new_with_schema(
window_expr,
- schema: Arc::new(
+ input,
+ Arc::new(
DFSchema::new_with_metadata(window_fields, metadata)?
.with_functional_dependencies(window_func_dependencies)?,
),
+ )
+ }
+
+ pub fn try_new_with_schema(
Review Comment:
Perhaps we can add some documentation strings that explain how this is
different than `Window::try_new` (specifically that the schema check is much
faster)?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]