You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/03/30 16:23:45 UTC

[GitHub] [arrow-rs] tustvold commented on a diff in pull request #3953: Don't discard nulls converting StructArray to RecordBatch (#3951)

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


##########
arrow-array/src/record_batch.rs:
##########
@@ -447,23 +447,28 @@ impl Default for RecordBatchOptions {
         Self::new()
     }
 }
+impl From<StructArray> for RecordBatch {
+    fn from(value: StructArray) -> Self {
+        assert_eq!(
+            value.null_count(),
+            0,
+            "Cannot convert nullable StructArray to RecordBatch"

Review Comment:
   That would be a possibility, but then what happens if the children are not nullable - either because of their type, e.g. RunArray or UnionArray, or because the field is labelled not nullable?



-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org