tustvold opened a new issue, #4801: URL: https://github.com/apache/arrow-rs/issues/4801
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] (This section helps Arrow developers understand the context and *why* for this feature, in addition to the *what*) --> Comparing primitive arrays for equality, perhaps in the context of a compute kernel, is relatively straightforward. A `DataType::Int8` is equal to `DataType::Int8` and not equal to `DataType::UInt8`. For nested types such as `StructArray`, `ListArray` and `RecordBatch` this gets more complex, how strictly should we enforce that a schema is consistent. Should we allow an array to be of a different type to its schema, what about nullability or metadata? We currently have a range of approaches: * RowConvert accepts any arrays so long as the array's `DataType::equals_datatype`, ignoring metadata and field names, but validating nullability * Parquet's ArrowWriter accept any RecordBatch so long as the writer's `Schema::contains` the provided batch schema, this forces nullability and metadata to be a subset * arrow-ipc, arrow-json, arrow-csv writers ignore the schema entirely, potentially allowing it to change between batches * Most kernels and array constructors use PartialEq to enforce equality of their input arrays * MutableArrayData uses the types of the first batch and will panic if it encounters inconsistency **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> I don't really know, eagerly performing validation can help to catch bugs and issues, but on the flip side it is frustrating to be validating things like field names, metadata, or even nullability, that in most cases won't make a different to correctness **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> **Additional context** <!-- Add any other context or screenshots about the feature request here. --> #1888 #3226 #4799 -- 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]
