ozankabak commented on code in PR #9686:
URL: https://github.com/apache/arrow-datafusion/pull/9686#discussion_r1529678537
##########
datafusion/physical-plan/src/windows/mod.rs:
##########
@@ -174,20 +174,15 @@ fn create_built_in_window_expr(
name: String,
ignore_nulls: bool,
) -> Result<Arc<dyn BuiltInWindowFunctionExpr>> {
- // need to get the types into an owned vec for some reason
- let input_types: Vec<_> = args
- .iter()
- .map(|arg| arg.data_type(input_schema))
- .collect::<Result<_>>()?;
+ // derive the output datatype from incoming schema
+ let out_data_type: &DataType =
input_schema.field_with_name(&name)?.data_type();
Review Comment:
I am not sure how this works (or makes sense), can you help me understand?
How can you decide the output type of a function without knowing what the
function is (i.e. using `fun.return_type`)? Is it always guaranteed that you
will find `name` in `input_schema`? If yes, no problem. But if no, shouldn't
you fall back to using `fun.return_type`?
I understand that some people may want to have `ROW_NUMBER` output an `Int`
instead of an `UInt` (which doesn't make sense but I can see how such an ask
may arise for backwards compatibility reasons).
##########
datafusion/core/tests/fuzz_cases/window_fuzz.rs:
##########
@@ -142,6 +144,7 @@ async fn window_bounded_window_random_comparison() ->
Result<()> {
// This tests whether we can generate bounded window results for each input
// batch immediately for causal window frames.
#[tokio::test(flavor = "multi_thread", worker_threads = 16)]
+#[ignore = "reason"]
Review Comment:
Is this a leftover?
--
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]