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

Peter Toth resolved SPARK-58578.
--------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

Issue resolved by pull request 57789
[https://github.com/apache/spark/pull/57789]

> 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
>             Fix For: 4.3.0
>
>
> `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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to