@@ -386,8 +386,8 @@ For example:
386386
387387The [ built-in DataFrames functions] ( api/scala/index.html#org.apache.spark.sql.functions$ ) provide common
388388aggregations such as ` count() ` , ` countDistinct() ` , ` avg() ` , ` max() ` , ` min() ` , etc.
389- While those functions are designed for DataFrames, Spark SQL also has type-safe versions for some of them in
390- [ Scala] ( api/scala/index.html#org.apache.spark.sql.expressions.scalalang.typed$ ) and
389+ While those functions are designed for DataFrames, Spark SQL also has type-safe versions for some of them in
390+ [ Scala] ( api/scala/index.html#org.apache.spark.sql.expressions.scalalang.typed$ ) and
391391[ Java] ( api/java/org/apache/spark/sql/expressions/javalang/typed.html ) to work with strongly typed Datasets.
392392Moreover, users are not limited to the predefined aggregate functions and can create their own.
393393
@@ -397,7 +397,7 @@ Moreover, users are not limited to the predefined aggregate functions and can cr
397397
398398<div data-lang =" scala " markdown =" 1 " >
399399
400- Users have to extend the [ UserDefinedAggregateFunction] ( api/scala/index.html#org.apache.spark.sql.expressions.UserDefinedAggregateFunction )
400+ Users have to extend the [ UserDefinedAggregateFunction] ( api/scala/index.html#org.apache.spark.sql.expressions.UserDefinedAggregateFunction )
401401abstract class to implement a custom untyped aggregate function. For example, a user-defined average
402402can look like:
403403
@@ -888,8 +888,9 @@ or a JSON file.
888888
889889Note that the file that is offered as _ a json file_ is not a typical JSON file. Each
890890line must contain a separate, self-contained valid JSON object. For more information, please see
891- [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) . As a
892- consequence, a regular multi-line JSON file will most often fail.
891+ [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) .
892+
893+ For a regular multi-line JSON file, set the ` wholeFile ` option to ` true ` .
893894
894895{% include_example json_dataset scala/org/apache/spark/examples/sql/SQLDataSourceExample.scala %}
895896</div >
@@ -901,8 +902,9 @@ or a JSON file.
901902
902903Note that the file that is offered as _ a json file_ is not a typical JSON file. Each
903904line must contain a separate, self-contained valid JSON object. For more information, please see
904- [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) . As a
905- consequence, a regular multi-line JSON file will most often fail.
905+ [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) .
906+
907+ For a regular multi-line JSON file, set the ` wholeFile ` option to ` true ` .
906908
907909{% include_example json_dataset java/org/apache/spark/examples/sql/JavaSQLDataSourceExample.java %}
908910</div >
@@ -913,8 +915,9 @@ This conversion can be done using `SparkSession.read.json` on a JSON file.
913915
914916Note that the file that is offered as _ a json file_ is not a typical JSON file. Each
915917line must contain a separate, self-contained valid JSON object. For more information, please see
916- [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) . As a
917- consequence, a regular multi-line JSON file will most often fail.
918+ [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) .
919+
920+ For a regular multi-line JSON file, set the ` wholeFile ` parameter to ` true ` .
918921
919922{% include_example json_dataset python/sql/datasource.py %}
920923</div >
@@ -926,8 +929,9 @@ files is a JSON object.
926929
927930Note that the file that is offered as _ a json file_ is not a typical JSON file. Each
928931line must contain a separate, self-contained valid JSON object. For more information, please see
929- [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) . As a
930- consequence, a regular multi-line JSON file will most often fail.
932+ [ JSON Lines text format, also called newline-delimited JSON] ( http://jsonlines.org/ ) .
933+
934+ For a regular multi-line JSON file, add a named parameter ` wholeFile ` to ` true ` .
931935
932936{% include_example json_dataset r/RSparkSQLExample.R %}
933937
0 commit comments