You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/08/05 09:22:00 UTC

[jira] [Updated] (SPARK-58578) Mark ApplyFunctionExpression stateful to prevent reusedRow data races under concurrent evaluation

     [ https://issues.apache.org/jira/browse/SPARK-58578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated SPARK-58578:
-----------------------------------
    Labels: pull-request-available  (was: )

> Mark ApplyFunctionExpression stateful to prevent reusedRow data races under concurrent evaluation
> -------------------------------------------------------------------------------------------------
>
>                 Key: SPARK-58578
>                 URL: https://issues.apache.org/jira/browse/SPARK-58578
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.5.0, 4.1.0, 4.0.0, 4.2.0, 4.3.0
>            Reporter: Vinod KC
>            Priority: Major
>              Labels: pull-request-available
>
> `ApplyFunctionExpression` holds a shared mutable row buffer (reusedRow) on the expression instance. When sibling QueryExecutions derived from the same base DataFrame run concurrently, they share the same expression instance and race on this buffer, silently producing wrong results.
> Because stateful defaults to false, the expression is never cloned before concurrent execution. Need to override def stateful: Boolean = true, which causes each concurrent execution to get its own independent instance.



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