comphead commented on code in PR #16203:
URL: https://github.com/apache/datafusion/pull/16203#discussion_r2112177778


##########
datafusion/functions-nested/src/extract.rs:
##########
@@ -225,6 +225,23 @@ where
         return Ok(Arc::new(NullArray::new(array.len())));
     }
 
+    if let DataType::Struct(fields) = values.data_type() {
+        let has_null_fields = fields.iter().any(|field| field.data_type() == 
&Null);
+        if has_null_fields {
+            // Instead of trying to extract from malformed struct data and 
return appropriate nulls
+            let mut null_array_data = Vec::with_capacity(array.len());

Review Comment:
   to return I think we can return NullArray like here?
   ```
       if values.data_type().is_null() {
            return Ok(Arc::new(NullArray::new(array.len())));
        }
   ```



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