tustvold commented on code in PR #1904:
URL: https://github.com/apache/arrow-rs/pull/1904#discussion_r901064342


##########
arrow/src/record_batch.rs:
##########
@@ -160,20 +160,27 @@ impl RecordBatch {
             }
         };
 
-        // check that all columns match the schema
-        let not_match = columns
-            .iter()
-            .zip(schema.fields().iter())
-            .map(|(col, field)| (col.data_type(), field.data_type()))
-            .enumerate()
-            .find(type_not_match);
+        let is_all_nones = columns.iter().all(|x| {

Review Comment:
   I'm really not sure about this, perhaps @alamb can weigh in here, skipping 
schema checks just because the arrays are empty feels likely to cause surprise 
down the line.
   
   If we do anything, I think it would be better to special case just empty 
fixed size arrays with fixed size length 0, and allow them to compare equal to 
other fixed size arrays of the same type.
   
   My personal preference would be to make the from_iterator method take the 
length of the arrays as an argument, rather than adding workarounds in other 
parts of the codebase.



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

Reply via email to