alamb commented on pull request #10063: URL: https://github.com/apache/arrow/pull/10063#issuecomment-821802258
> This isn't an area that I'm super-familiar with, but are there any existing methods or expectations around merging schemas that differ solely on nullability, e.g. merging two schemas together and inferring the nullability of each field by ORing the nullability on each side of the merge? So if either schema declares the field as nullable, we take the resultant schema as nullable. The only place I know about merging schema `Field`s is here: https://github.com/apache/arrow/blob/2f3ed3ac4e8b62dd67b52213f1347bc3e050a781/rust/arrow/src/datatypes/field.rs#L485 Which by my reading effectively does do an OR of `nullability). > If not, then I'd agree that we probably should keep this explicitly declared and not infer it here. Given my usecase of "make a single record batch from a known set of arrays" I really would prefer to avoid having to include redundant information (nullability). However, given we are going to go with a `From` / `TryFrom` implementation I think that means we can also add something like ```rust let batch: RecordBatch = vec![ ("a", float_array, false), ("b", timestamp_array, true), ].into(); ``` Or similar to specifically specify the nullability. -- 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. For queries about this service, please contact Infrastructure at: [email protected]
