GitHub user andrewor14 opened a pull request:

    https://github.com/apache/spark/pull/12589

    [SPARK-14828][SQL] Start SparkSession in REPL instead of SQLContext

    ## What changes were proposed in this pull request?
    
    ```
    Spark context available as sc (master = local[*], app id = 
local-1461283768192).
    Spark session available as sparkSession.
    Welcome to
          ____              __
         / __/__  ___ _____/ /__
        _\ \/ _ \/ _ `/ __/  '_/
       /___/ .__/\_,_/_/ /_/\_\   version 2.0.0-SNAPSHOT
          /_/
             
    Using Scala version 2.11.8 (Java HotSpot(TM) 64-Bit Server VM, Java 
1.7.0_51)
    Type in expressions to have them evaluated.
    Type :help for more information.
    
    scala> sql("SHOW TABLES").collect()
    16/04/21 17:09:39 WARN ObjectStore: Version information not found in 
metastore. hive.metastore.schema.verification is not enabled so recording the 
schema version 1.2.0
    16/04/21 17:09:39 WARN ObjectStore: Failed to get database default, 
returning NoSuchObjectException
    res0: Array[org.apache.spark.sql.Row] = Array([src,false])
    
    scala> sql("SHOW TABLES").collect()
    res1: Array[org.apache.spark.sql.Row] = Array([src,false])
    ```
    
    Hive things are loaded lazily.
    
    ## How was this patch tested?
    
    Manual.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andrewor14/spark spark-session-repl

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12589.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12589
    
----
commit e7dee4f522479a75c587189bf8c37cfcddb184ba
Author: Andrew Or <[email protected]>
Date:   2016-04-22T00:08:28Z

    Initialize sparkSession in REPL instead of sqlContext

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to