Github user felixcheung commented on a diff in the pull request:
https://github.com/apache/spark/pull/18498#discussion_r125190454
--- Diff: python/pyspark/sql/functions.py ---
@@ -1839,15 +1839,19 @@ def from_json(col, schema, options={}):
string.
:param col: string column in json format
- :param schema: a StructType or ArrayType of StructType to use when
parsing the json column
+ :param schema: a StructType or ArrayType of StructType to use when
parsing the json column.
:param options: options to control parsing. accepts the same options
as the json datasource
+ .. note:: Since Spark 2.3, the DDL-formatted string is also supported
for ``schema``.
--- End diff --
ah nicer.
yes, we should document the behavior where the code already supports it
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]