Skip to content

Commit 231f230

Browse files
committed
fix type calculation
1 parent e4c25ca commit 231f230

File tree

1 file changed

+4
-4
lines changed
  • datafusion/core/src/physical_plan/windows

1 file changed

+4
-4
lines changed

datafusion/core/src/physical_plan/windows/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ fn create_udwf_window_expr(
198198
name: String,
199199
) -> Result<Arc<dyn BuiltInWindowFunctionExpr>> {
200200
// need to get the types into an owned vec for some reason
201-
let input_types: Vec<_> = input_schema
202-
.fields()
201+
let input_types: Vec<_> = args
203202
.iter()
204-
.map(|f| f.data_type().clone())
205-
.collect();
203+
.map(|arg| arg.data_type(input_schema).map(|dt| dt.clone()))
204+
.collect::<Result<_>>()?;
205+
206206
// figure out the output type
207207
let data_type = (fun.return_type)(&input_types)?;
208208
Ok(Arc::new(WindowUDFExpr {

0 commit comments

Comments
 (0)