anishmehta24 opened a new pull request, #40462:
URL: https://github.com/apache/beam/pull/40462
`SortAndBatchElements` cut a batch when adding the next element would make
it weigh exactly `max_batch_weight`, so batches never reached the limit. Four
size-5 elements with `max_batch_weight=10` came out as four batches of one
instead of two batches of two.
Both DoFns now use `>` for the weight check, same as `BatchElements`. Added
a test for each DoFn that fails on master; `util_test.py` passes.
fixes #40461
Written with help from Claude.
------------------------
- [x] Mention the appropriate issue in your description (for example:
`addresses #123`), if applicable. This will automatically add a link to the
pull request in the issue. If you would like the issue to automatically close
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
--
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]