alamb commented on issue #12364: URL: https://github.com/apache/arrow-rs/issues/12364#issuecomment-7110111929
> Thanks to both of you! > > > Thus if you really store your data in a single row group per file, you'll have to buffer most of the file before you get the pages of the last column to begin merging > > [@alamb](https://github.com/alamb) There's a misunderstanding here. We do not consume this data in `RecordBatch`es like DataFusion would. We don’t need to reach the last column before starting the merge. Each input has its columns in lexicographic order. We merge column `bar` from the input(s) that contain it, emit the output, then move on to `foo`, and so on. **Within each column, we can process the data incrementally at data-page granularity**. We’re never assembling complete rows across all columns. > > So keeping each column chunk contiguous actually fits our access pattern best. We don’t need to buffer the whole row group, or split it into smaller row groups to make progress. I think I was confused then about how you would satisfy this requirement > Exactly one streaming GET request per input file is a hard requirement. I was thinking that if you use a parquet file with a single row group, the column chunks look like this: ```text Page 0 for column A Page 1 for column A. <--- all pages for a column chunk must be contiguous .... Page 0 for column B Page 1 for column B ... ... Page 0 for column Z Page 1 for column Z ``` So you can't reconstruct rows without either buffering all the other columns or doing multiple requests. However, now I get it that when you are merging from multiple files, you can just walk down the pages for column A then column B, etc 👍 -- 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]
