findepi commented on code in PR #13756: URL: https://github.com/apache/datafusion/pull/13756#discussion_r1884576381
########## datafusion/functions-nested/src/extract.rs: ########## @@ -993,3 +993,84 @@ where let data = mutable.freeze(); Ok(arrow::array::make_array(data)) } + +#[cfg(test)] +mod tests { + use super::array_element_udf; + use arrow_schema::{DataType, Field}; + use datafusion_common::{Column, DFSchema, ScalarValue}; + use datafusion_expr::expr::ScalarFunction; + use datafusion_expr::{cast, Expr, ExprSchemable}; + use std::collections::HashMap; + + #[test] + fn test_array_element_return_type() { + let complex_type = DataType::FixedSizeList( Review Comment: > Weird, when I remove this line in expr schema the test passes (with FixedSizedList): i did the same, basically removing this block https://github.com/apache/datafusion/blob/b30c2007c2209bca90f2c285a775f09d9a56be03/datafusion/expr/src/expr_schema.rs#L155-L167 it's enough to fix the unit test in this PR but other things start to fail > It doesn't seem right to me that `ExprSchema` is coercing the arguments (implicitly) to me 🤔 agreed -- 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