HaoYang670 commented on issue #1799: URL: https://github.com/apache/arrow-rs/issues/1799#issuecomment-1147381920
> Introduce a new ArrayDataLayout enumeration: ```rust pub enum ArrayDataLayout { Boolean { values: Buffer }, Primitive{ values: Buffer }, Offsets { offsets: Buffer, values: Buffer }, Dictionary { keys: Buffer, values: ArrayData }, List { offsets: Buffer, elements: ArrayData }, Struct { children: Vec<ArrayData> }, Union { offsets: Option<Buffer>, types: Buffer, children: Vec<ArrayData> }, } ``` I guess in this way, `Arrays` don't share the same layout anymore. Personally, I like it. Much clear than `ArrayData`. Curiously, why not directly declare each type of Array with `Buffers`, for example: ```rust Struct GenericBinaryArray { validatity: Option<Bitmap>, null_count: Option<usize>, offsets: Buffer, values: Buffer, } -- 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