Vinod KC created SPARK-58205:
--------------------------------

             Summary: 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: 4.2.0, 4.0.0, 4.1.0, 3.5.0, 4.3.0
            Reporter: Vinod KC


Seven JSON/CSV/XML expressions (JsonToStructs, GetJsonObject, JsonTuple, 
CsvToStructs, StructsToCsv, XmlToStructs, StructsToXml) maintain mutable state 
in @transient lazy val evaluator fields but do not override stateful.

As a result, freshCopyIfContainsStatefulExpression() never copies them, so when 
two projections share the same expression node (e.g. via ConvertToLocalRelation 
or pipelined execution), threads race on the shared evaluator object and 
silently corrupt results.



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