You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@carbondata.apache.org by GitBox <gi...@apache.org> on 2021/08/08 08:53:19 UTC

[GitHub] [carbondata] Pandahunter-cloud commented on a change in pull request #4197: [CARBONDATA-4267][Doc][summer-2021]Update and modify some content in quick-start-guide.md

Pandahunter-cloud commented on a change in pull request #4197:
URL: https://github.com/apache/carbondata/pull/4197#discussion_r684726595



##########
File path: docs/quick-start-guide.md
##########
@@ -161,12 +161,23 @@ Start Spark shell by running the following command in the Spark directory:
 ```
 ./bin/spark-shell --conf spark.sql.extensions=org.apache.spark.sql.CarbonExtensions --jars <carbondata assembly jar path>
 ```
+
+In this shell, SparkSession is readily available as `spark` and Spark context is readily available as `sc`.
+
+In order to create a SparkSession we will have to configure it explicitly in the following manner :
+
+* Import the following :
+
+```
+import org.apache.spark.sql.SparkSession
+```
+
 **NOTE** 
  - In this flow, we can use the built-in SparkSession `spark` instead of `carbon`.
    We also can create a new SparkSession instead of the built-in SparkSession `spark` if need. 
    It need to add "org.apache.spark.sql.CarbonExtensions" into spark configuration "spark.sql.extensions". 
    ```
-   SparkSession newSpark = SparkSession
+   val newSpark : SparkSession = SparkSession

Review comment:
       In Option 2, an error will be reported when I use this method to declare a new sparksession object in spark-shell.
   ![image](https://user-images.githubusercontent.com/74487288/128623742-0127218b-2205-43ed-879c-7a6f2988817c.png)
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@carbondata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org