Ben Hollis created SPARK-58277:
----------------------------------
Summary: 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
*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: [email protected]
For additional commands, e-mail: [email protected]