neilconway opened a new pull request, #10660: URL: https://github.com/apache/arrow-rs/pull/10660
# Which issue does this PR close? - Closes #10659 # Rationale for this change Zero is not a sensible value for either parameter, and allowing a zero value results in an infinite loop when writing out chunks in `GenericColumnWriter::write_batch_internal()`. # What changes are included in this PR? * `set_write_batch_size` and `set_data_page_row_count_limit` now panic if they are passed zeroes. This is consistent with how other similar functions handle invalid input (e.g., `set_max_row_group_row_count`, `set_max_row_group_bytes`), although it could potentially be improved (e.g., return `Result`). * Add unit tests * Add assert to `GenericColumnWriter::write_batch_internal()` that we've selected a non-zero `base_batch_size`. # Are these changes tested? Yes, and new tests added. # Are there any user-facing changes? No, aside from corner-cases where the user was passing a zero to either of these functions and then not triggering the buggy behavior. -- 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]
