zhengruifeng opened a new pull request, #58105:
URL: https://github.com/apache/spark/pull/58105

   ### What changes were proposed in this pull request?
   
   This PR strengthens the existing `mapInPandas` and `mapInArrow` barrier-mode 
tests.
   
   For the non-barrier case, the tests now call `BarrierTaskContext.get()` 
directly and assert
   that it fails. The existing checks continue to verify that 
`TaskContext.get()` is present and
   is not a `BarrierTaskContext` outside barrier mode.
   
   ### Why are the changes needed?
   
   `BarrierTaskContext` should only be available in barrier execution. The 
existing SQL map API
   tests checked the `TaskContext.get()` type in both modes, but they did not 
directly verify that
   `BarrierTaskContext.get()` fails when `barrier=False`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Added negative coverage to existing PySpark SQL tests:
   
   - `MapInPandasTestsMixin.test_map_in_pandas_with_barrier_mode`
   - `MapInArrowTestsMixin.test_map_in_arrow_with_barrier_mode`
   
   Local checks:
   
   - `git diff --check`
   - ASCII and line-length scans on changed files
   
   Focused PySpark suites were not run locally.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: OpenAI Codex (GPT-5)
   


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