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/07/23 03:11:00 UTC
[jira] [Updated] (SPARK-58277) Stream DataType.json to bound peak driver memory for large schemas
[ https://issues.apache.org/jira/browse/SPARK-58277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated SPARK-58277:
-----------------------------------
Labels: pull-request-available (was: )
> Stream DataType.json to bound peak driver memory for large schemas
> ------------------------------------------------------------------
>
> Key: SPARK-58277
> URL: https://issues.apache.org/jira/browse/SPARK-58277
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 4.3.0
> Reporter: Ben Hollis
> Priority: Minor
> Labels: pull-request-available
>
> *Problem*
> DataType.json builds the entire schema's json4s AST in memory and then renders it to a String. The intermediate AST is roughly an order of magnitude larger than the resulting JSON string, so for a very wide or deeply nested schema it can dominate — and in pathological cases exhaust — the driver heap, even though the final JSON is comparatively small.
> *Goal*
> Make DataType JSON serialization bound its peak memory to something proportional to the output rather than to the whole schema's AST, with byte-for-byte identical output and no public API or format change.
--
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