diff options
author | Tejas Patil <tejasp@fb.com> | 2016-05-13 18:10:22 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-05-13 18:10:22 -0700 |
commit | 4210e2a6b77f922f03eedf781a4230ab03a189cd (patch) | |
tree | 75765322547089868cde549bc33caacd3e2775b5 | |
parent | 3ded5bc4db2badc9ff49554e73421021d854306b (diff) | |
download | spark-4210e2a6b77f922f03eedf781a4230ab03a189cd.tar.gz spark-4210e2a6b77f922f03eedf781a4230ab03a189cd.tar.bz2 spark-4210e2a6b77f922f03eedf781a4230ab03a189cd.zip |
[TRIVIAL] Add () to SparkSession's builder function
## What changes were proposed in this pull request?
Was trying out `SparkSession` for the first time and the given class doc (when copied as is) did not work over Spark shell:
```
scala> SparkSession.builder().master("local").appName("Word Count").getOrCreate()
<console>:27: error: org.apache.spark.sql.SparkSession.Builder does not take parameters
SparkSession.builder().master("local").appName("Word Count").getOrCreate()
```
Adding () to the builder method in SparkSession.
## How was this patch tested?
```
scala> SparkSession.builder().master("local").appName("Word Count").getOrCreate()
res0: org.apache.spark.sql.SparkSession = org.apache.spark.sql.SparkSession65c17e38
scala> SparkSession.builder.master("local").appName("Word Count").getOrCreate()
res1: org.apache.spark.sql.SparkSession = org.apache.spark.sql.SparkSession65c17e38
```
Author: Tejas Patil <tejasp@fb.com>
Closes #13086 from tejasapatil/doc_correction.
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala b/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala index 02c9dc03ae..100b43f6b5 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala @@ -755,7 +755,7 @@ object SparkSession { * Creates a [[SparkSession.Builder]] for constructing a [[SparkSession]]. * @since 2.0.0 */ - def builder: Builder = new Builder + def builder(): Builder = new Builder private val HIVE_SHARED_STATE_CLASS_NAME = "org.apache.spark.sql.hive.HiveSharedState" private val HIVE_SESSION_STATE_CLASS_NAME = "org.apache.spark.sql.hive.HiveSessionState" |