Yicong-Huang opened a new pull request, #53976:
URL: https://github.com/apache/spark/pull/53976

   ### What changes were proposed in this pull request?
   
   This PR extracts a `_write_stream_start` helper method in 
`ArrowStreamSerializer` to centralize the `START_ARROW_STREAM` signal writing 
logic.
   
   ### Why are the changes needed?
   
   Multiple Arrow serializers repeated the same pattern for writing 
`START_ARROW_STREAM`:
   
   ```python
   should_write_start_length = True
   for batch in batches:
       if should_write_start_length:
           write_int(SpecialLengths.START_ARROW_STREAM, stream)
           should_write_start_length = False
       yield batch
   ```
   
   The new helper centralizes this logic into a single reusable method.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing tests.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   No.


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