sam-1112 commented on code in PR #7742:
URL: https://github.com/apache/datafusion-comet/pull/7742#discussion_r4666003534


##########
docs/source/contributor-guide/memory_management.md:
##########
@@ -528,9 +528,8 @@ the executor.
 
 - `ParquetWriterExec` writes one file per task and reserves parquet-rs's 
estimate of the file's
   in-progress row group (`ArrowWriter::memory_size`). The estimate counts 
encoded pages, encoder
-  buffers, dictionaries and Bloom filters. The writer keeps parquet-rs's 
default row-group limit of
-  1Mi rows and sets no byte limit, so a wide schema can hold a large row group
-  ([#5304](https://github.com/apache/datafusion-comet/issues/5304)). A file 
that is neither local
+  buffers, dictionaries and Bloom filters. A row group is bounded by 
parquet-rs's default of 1Mi

Review Comment:
   Could we describe this as an estimated encoded-size flush threshold and 
retain an updated version of the user guide's “Row groups that outgrow the 
memory pool” limitation? `max_row_group_bytes` is checked against the estimated 
encoded size, while Comet reserves `writer.memory_size()`, which also includes 
dictionary and encoder overhead. In a standalone probe with the PR's locked 
parquet-rs 59.3.2, 128 string columns and 8192-row batches reached 
`in_progress_size() = 115032448` bytes (109.7 MiB) and `memory_size() = 
421217536` bytes (401.7 MiB) before flushing, despite a 128 MiB byte limit. The 
existing `reservation.try_resize(writer.memory_size())?` would therefore still 
fail against a 256 MiB pool. This change helps control row-group size, but it 
does not eliminate the documented pool-exhaustion case.



-- 
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]

Reply via email to