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

Hyukjin Kwon resolved SPARK-58205.
----------------------------------
    Fix Version/s: 4.3.0
       Resolution: Fixed

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

> Mark JSON/CSV/XML expressions stateful to prevent shared-evaluator data races
> -----------------------------------------------------------------------------
>
>                 Key: SPARK-58205
>                 URL: https://issues.apache.org/jira/browse/SPARK-58205
>             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
>            Assignee: Vinod KC
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.3.0
>
>
> Several JSON, CSV, and XML expressions hold mutable state in @transient lazy 
> val evaluator fields but did not override stateful: Boolean (which defaults 
> to false).
> Because of this, freshCopyIfContainsStatefulExpression() never made fresh 
> copies of these expressions, so when the same expression object was 
> referenced more than once in a query plan — e.g., df.select(from_json(col, 
> schema), from_json(col, schema)) — both references shared the same underlying 
> evaluator instance. In interpreted execution this caused data-race corruption 
> and incorrect results.
> The affected expressions were:
> - GetJsonObject, JsonTuple, JsonToStructs, StructsToJson, SchemaOfJson (JSON)
> - CsvToStructs, StructsToCsv, SchemaOfCsv (CSV)
> - XmlToStructs, StructsToXml (XML)



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