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

   ### What changes were proposed in this pull request?
   
   Refactor `SQL_GROUPED_MAP_ARROW_UDF` and `SQL_GROUPED_MAP_ARROW_ITER_UDF` to 
be self-contained in `read_udfs()`, following the same pattern established by 
SPARK-56123 (grouped agg arrow) and SPARK-56189 (window agg arrow).
   
   Key changes:
   - **Remove wrapper functions** `wrap_grouped_map_arrow_udf` and 
`wrap_grouped_map_arrow_iter_udf` from the module-level scope
   - **Remove `ArrowStreamGroupUDFSerializer` usage** - these eval types now 
use `ArrowStreamGroupSerializer` (pure I/O) like other grouped arrow eval types
   - **Move all processing logic into `read_udfs()`** - flatten struct, extract 
key/value columns, call UDF, verify output, reorder columns, and wrap struct 
are all handled in the self-contained `grouped_func`
   - **Move `extract_key_value_indexes`** earlier in `read_udfs()` so it is 
available to both arrow and pandas grouped eval types
   - **Pass `(func, args_offsets, return_type, num_udf_args)` from 
`read_single_udf`** instead of a pre-wrapped function, consistent with other 
refactored eval types
   
   ### Why are the changes needed?
   
   Part of SPARK-55388 (Refactor PythonEvalType processing logic). Making each 
eval type self-contained in `read_udfs()` improves readability and makes it 
easier to reason about the data flow for each eval type independently.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   Existing tests. No behavior change.
   
   ### 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