You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Yicong-Huang (via GitHub)" <gi...@apache.org> on 2026/03/24 23:49:13 UTC

[PR] [SPARK-55170][PYTHON][FOLLOWUP] Extract _read_arrow_stream to fix latent recursion in _load_group_dataframes [spark]

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

   ### What changes were proposed in this pull request?
   
   Extract `_read_arrow_stream()` classmethod in `ArrowStreamSerializer` and replace all calls to `ArrowStreamSerializer.load_stream(self, stream)` inside `_load_group_dataframes` and `ArrowStreamUDTFSerializer`.
   
   ### Why are the changes needed?
   
   `_load_group_dataframes` called `ArrowStreamSerializer.load_stream(self, stream)` to read a plain Arrow IPC stream within each group. However, `load_stream` dispatches on `self._num_dfs`, so when `num_dfs != 0`, this creates infinite recursion. Currently all callers happen to have `num_dfs=0`, masking the bug. Extracting a dedicated `_read_arrow_stream` classmethod makes the intent explicit and prevents the recursion regardless of `num_dfs`.
   
   ### 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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-55170][PYTHON][FOLLOWUP] Extract _read_arrow_stream to fix latent recursion in _load_group_dataframes [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #54994: [SPARK-55170][PYTHON][FOLLOWUP] Extract _read_arrow_stream to fix latent recursion in _load_group_dataframes
URL: https://github.com/apache/spark/pull/54994


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-55170][PYTHON][FOLLOWUP] Extract _read_arrow_stream to fix latent recursion in _load_group_dataframes [spark]

Posted by "Yicong-Huang (via GitHub)" <gi...@apache.org>.
Yicong-Huang commented on PR #54994:
URL: https://github.com/apache/spark/pull/54994#issuecomment-4124216330

   cc @zhengruifeng @HyukjinKwon 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-55170][PYTHON][FOLLOWUP] Extract _read_arrow_stream to fix latent recursion in _load_group_dataframes [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #54994:
URL: https://github.com/apache/spark/pull/54994#issuecomment-4125507850

   Merged to master.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org