-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Describe the bug
As a part of migrating min/max to user-defined aggregate function, the test `'cases::roundtrip_physical_plan::roundtrip_scalar_udf_extension_codec' (datafusion/proto/tests/cases/roundtrip_physical_plan.rs) fails
datafusion/datafusion/proto/tests/cases/roundtrip_physical_plan.rs
Lines 952 to 964 in ecf5323
| Arc::new(Max::new(udf_expr.clone(), "max", DataType::Int64)), | |
| &[col("author", &schema)?], | |
| &[], | |
| Arc::new(WindowFrame::new(None)), | |
| ))], | |
| filter, | |
| vec![col("author", &schema)?], | |
| )?); | |
| let aggregate = Arc::new(AggregateExec::try_new( | |
| AggregateMode::Final, | |
| PhysicalGroupBy::new(vec![], vec![], vec![]), | |
| vec![Arc::new(Max::new(udf_expr, "max", DataType::Int64))], |
After investigating the failure (see https://github.com/apache/datafusion/actions/runs/10040552648/job/27746844799?pr=11013#step:4:5769) it appears that the signature, the aliases and the name are lost in serialization/deserialization

This doesn't appear to be a problem related to migrating min/max to user-defined functions but rather a general problem we only encounter because that's the only roundtrip serialization/deserialization tests that involve UDF
To Reproduce
No response
Expected behavior
Roundtrip should work correctly and restore aliases, as well as correct names and signature
Additional context
No response