You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Jungtaek Lim (Jira)" <ji...@apache.org> on 2025/02/28 01:52:00 UTC

[jira] [Commented] (SPARK-51351) TWS PySpark implementation materializes the entire output iterator in python worker

    [ https://issues.apache.org/jira/browse/SPARK-51351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17931346#comment-17931346 ] 

Jungtaek Lim commented on SPARK-51351:
--------------------------------------

Going to file a PR sooner.

> TWS PySpark implementation materializes the entire output iterator in python worker
> -----------------------------------------------------------------------------------
>
>                 Key: SPARK-51351
>                 URL: https://issues.apache.org/jira/browse/SPARK-51351
>             Project: Spark
>          Issue Type: Bug
>          Components: Structured Streaming
>    Affects Versions: 4.0.0
>            Reporter: Jungtaek Lim
>            Priority: Critical
>
> I figured out the implementation of dump_stream is materializing the output iterator.
> This means all the outputs will be materialized when JVM signals to Python worker that there is no further input (at task completion), which brings up two critical issues:
>  # output is seriously delayed to be produced for downstream operator
>  # memory usage on Python worker would be problematic
> We need to make this be "lazy evaluated", mostly iterator/generator.



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