andygrove opened a new pull request, #3914: URL: https://github.com/apache/datafusion-comet/pull/3914
## Which issue does this PR close? Closes #. ## Rationale for this change `COMET_SHUFFLE_WRITE_BUFFER_SIZE` is a `Long` (configured via `bytesConf`) but the protobuf `ShuffleWriter.write_buffer_size` field is `int32`. The code converts with `.max(Int.MaxValue).toInt`, which always evaluates to `Int.MaxValue` (~2GB) regardless of the actual configured value. The intent was to cap the value at `Int.MaxValue`, which requires `.min(Int.MaxValue)`. The default config is 1MB, so every native shuffle write has been using a 2GB write buffer instead. ## What changes are included in this PR? One-character fix: `.max(Int.MaxValue)` → `.min(Int.MaxValue)` in `CometNativeShuffleWriter.scala`. ## How are these changes tested? Existing tests. The fix is a straightforward logic correction with no behavioral change for values already within Int range (which is all practical values). -- 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]
