diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index 86a88a5bf341e..4af5d1f484ee4 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -3527,7 +3527,7 @@ def schema_of_json(json, options={}): Parameters ---------- json : :class:`Column` or str - a JSON string or a string literal containing a JSON string. + a JSON string or a foldable string column containing a JSON string. options : dict, optional options to control parsing. accepts the same options as the JSON datasource @@ -3564,7 +3564,7 @@ def schema_of_csv(csv, options={}): Parameters ---------- csv : :class:`Column` or str - a CSV string or a string literal containing a CSV string. + a CSV string or a foldable string column containing a CSV string. options : dict, optional options to control parsing. accepts the same options as the CSV datasource diff --git a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala index 8d6281882f188..5dc1c6b5b49fc 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/functions.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/functions.scala @@ -4151,7 +4151,7 @@ object functions { /** * Parses a JSON string and infers its schema in DDL format. * - * @param json a string literal containing a JSON string. + * @param json a foldable string column containing a JSON string. * * @group collection_funcs * @since 2.4.0 @@ -4161,7 +4161,7 @@ object functions { /** * Parses a JSON string and infers its schema in DDL format using options. * - * @param json a string column containing JSON data. + * @param json a foldable string column containing JSON data. * @param options options to control how the json is parsed. accepts the same options and the * json data source. See [[DataFrameReader#json]]. * @return a column with string literal containing schema in DDL format. @@ -4426,7 +4426,7 @@ object functions { /** * Parses a CSV string and infers its schema in DDL format. * - * @param csv a string literal containing a CSV string. + * @param csv a foldable string column containing a CSV string. * * @group collection_funcs * @since 3.0.0 @@ -4436,7 +4436,7 @@ object functions { /** * Parses a CSV string and infers its schema in DDL format using options. * - * @param csv a string literal containing a CSV string. + * @param csv a foldable string column containing a CSV string. * @param options options to control how the CSV is parsed. accepts the same options and the * json data source. See [[DataFrameReader#csv]]. * @return a column with string literal containing schema in DDL format.