AnirudhSriram opened a new issue, #2702: URL: https://github.com/apache/iceberg-go/issues/2702
### Apache Iceberg version main (development) ### Please describe the bug 🐞 `GetWriteProperties` in `table/internal/parquet_files.go` passes `write.parquet.page-row-limit` (default 20000) to arrow-go as `parquet.WithBatchSize`. arrow-go checks the data page size only between write batches, so a page can grow to about batch size × value size before it is flushed. For large values that is far above `write.parquet.page-size-bytes` (default 1 MiB). https://github.com/apache/iceberg-go/blob/4ea6ff7/table/internal/parquet_files.go#L324-L325 Pages over 64 MiB can't be read back with arrow-go's default reader properties: ``` parquet: compressed page size ... exceeds configured limit 67108864 ``` **Repro.** Write 4000 rows of one 10 KiB string column with the properties from `GetWriteProperties` (uncompressed, dictionary off), then read the page sizes. The column chunk is one page of 40,976,000 bytes. With 20000 rows of 10 KiB values a page is over 100 MiB. ```go props := internal.GetFileFormat(iceberg.ParquetFile).GetWriteProperties(iceberg.Properties{ internal.ParquetCompressionKey: "uncompressed", }).([]parquet.WriterProperty) props = append(props, parquet.WithDictionaryDefault(false)) // write the record with pqarrow.NewFileWriter, then walk RowGroup(0).GetColumnPageReader(0) ``` **Possible fix.** Cap the write batch at a small row count (for example 32), so arrow-go checks the page size often. Pages then stay near 1 MiB for values up to 32 KiB. In a local benchmark (1M rows of int64, float64 and short strings), writes were about 3 to 4% slower. 32 is a starting point; it could also be a property or derived from the page size. arrow-go has no rows-per-page option, so `page-row-limit` only ever set the batch size here. I have a PR ready. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
