You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Yicong Huang (Jira)" <ji...@apache.org> on 2026/04/14 22:35:00 UTC
[jira] [Updated] (SPARK-56477) Refactor SQL_COGROUPED_MAP_ARROW_UDF to be self-contained in read_udfs
[ https://issues.apache.org/jira/browse/SPARK-56477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yicong Huang updated SPARK-56477:
---------------------------------
Description:
As part of the PySpark eval type refactoring effort (SPARK-55388), the SQL_COGROUPED_MAP_ARROW_UDF processing logic should be made self-contained within read_udfs() in worker.py.
Currently the logic is spread across three locations:
- wrap_cogrouped_map_arrow_udf() for verification and UDF dispatch
- CogroupArrowUDFSerializer.dump_stream() (inherited) for column reordering and struct wrapping
- The mapper block in read_udfs() for key/value extraction from batches
The refactoring should:
- Use ArrowStreamCoGroupSerializer as the pure I/O serializer (dual-stream cogroup reading)
- Move all UDF dispatch, verification, column reordering, schema enforcement, and struct wrapping into an inline handler in read_udfs()
- Delete wrap_cogrouped_map_arrow_udf and the mapper block
- Move extract_key_value_indexes earlier in read_udfs() so the new handler can use it
> Refactor SQL_COGROUPED_MAP_ARROW_UDF to be self-contained in read_udfs
> ----------------------------------------------------------------------
>
> Key: SPARK-56477
> URL: https://issues.apache.org/jira/browse/SPARK-56477
> Project: Spark
> Issue Type: Sub-task
> Components: PySpark
> Affects Versions: 4.2.0
> Reporter: Yicong Huang
> Priority: Major
>
> As part of the PySpark eval type refactoring effort (SPARK-55388), the SQL_COGROUPED_MAP_ARROW_UDF processing logic should be made self-contained within read_udfs() in worker.py.
> Currently the logic is spread across three locations:
> - wrap_cogrouped_map_arrow_udf() for verification and UDF dispatch
> - CogroupArrowUDFSerializer.dump_stream() (inherited) for column reordering and struct wrapping
> - The mapper block in read_udfs() for key/value extraction from batches
> The refactoring should:
> - Use ArrowStreamCoGroupSerializer as the pure I/O serializer (dual-stream cogroup reading)
> - Move all UDF dispatch, verification, column reordering, schema enforcement, and struct wrapping into an inline handler in read_udfs()
> - Delete wrap_cogrouped_map_arrow_udf and the mapper block
> - Move extract_key_value_indexes earlier in read_udfs() so the new handler can use it
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org