[GitHub] [carbondata] jackylk commented on a change in pull request #3364: [CARBONDATA-3503][Carbon2] Adapt to SparkSessionExtension

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [carbondata] jackylk commented on a change in pull request #3364: [CARBONDATA-3503][Carbon2] Adapt to SparkSessionExtension

GitBox
jackylk commented on a change in pull request #3364: [CARBONDATA-3503][Carbon2] Adapt to SparkSessionExtension
URL: https://github.com/apache/carbondata/pull/3364#discussion_r318161221
 
 

 ##########
 File path: examples/spark2/src/main/java/org/apache/carbondata/examples/sql/JavaCarbonSessionExample.java
 ##########
 @@ -40,10 +39,12 @@ public static void main(String[] args) throws IOException {
     SparkSession.Builder builder = SparkSession.builder()
         .master("local")
         .appName("JavaCarbonSessionExample")
-        .config("spark.driver.host", "localhost");
+        .config("spark.driver.host", "localhost")
+        .config("spark.sql.extensions", "org.apache.spark.sql.CarbonExtensions");
 
-    SparkSession carbon = new CarbonSession.CarbonBuilder(builder)
-        .getOrCreateCarbonSession();
+    SparkSession carbon = builder.getOrCreate();
 
 Review comment:
   ```suggestion
       SparkSession spark = builder.getOrCreate();
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[hidden email]


With regards,
Apache Git Services