gruuya commented on issue #13481:
URL: https://github.com/apache/datafusion/issues/13481#issuecomment-2489339715

   To reiterate, the real check for a fix here should be passing test like this
   ```rust
       #[test]
       fn test_simplify_cast_list() {
           use datafusion_functions_nested::expr_fn::make_array;
   
           let element_field = Arc::new(Field::new("element", DataType::Int32, 
true));
           let items_field =
               Field::new("items", DataType::List(element_field.clone()), true);
           let schema = Schema::new(vec![items_field.clone()])
               .to_dfschema()
               .unwrap();
   
           let input = cast(
               make_array(vec![lit(2), lit(3)]),
               DataType::List(element_field.clone()),
           );
   
           let output = simplify(input.clone());
           assert_eq!(
               input.data_type_and_nullable(&schema).unwrap(),
               output.data_type_and_nullable(&schema).unwrap(),
           );
       }
   ```
   
   In other words we'd want the type and nullability to remain the same after 
simplification.


-- 
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]

Reply via email to