tustvold commented on issue #1799: URL: https://github.com/apache/arrow-rs/issues/1799#issuecomment-1147445381
> My second thought is that we could refactor DataType like this: I think this would break the desired separation of logical vs physical types. We don't want callers to have to match on all the possible `DataType` variants in order to interpret the buffers. An IPC writer shouldn't care if it is a primitive array of floats, or int32, just that it is a buffer of n bytes. > introduces the possibility of the inconsistency between ArrayData::data_type and ArrayData::layout > I guess this could decrease the workload of ArrayData::validate. I don't think this is something to optimise for, we can easily add a cheap sanity check on construction. Tbh I don't think it would be all that bad `match data_type` would just change to `match (data_type, layout)`? I would be extremely hesitant to make fundamental changes to DataType. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org