You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Vinod KC (Jira)" <ji...@apache.org> on 2026/07/19 01:45:00 UTC

[jira] [Created] (SPARK-58205) Mark JSON/CSV/XML expressions stateful to prevent shared-evaluator data races

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: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org