You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by andrewor14 <gi...@git.apache.org> on 2016/03/24 18:36:44 UTC

[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

GitHub user andrewor14 opened a pull request:

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

    [SPARK-14014][SQL] Integrate session catalog (attempt #2)

    ## What changes were proposed in this pull request?
    
    This reopens #11836, which was merged but promptly reverted because it introduced flaky Hive tests.
    
    ## How was this patch tested?
    
    See `CatalogTestCases`, `SessionCatalogSuite` and `HiveContextSuite`.

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

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

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

    https://github.com/apache/spark/pull/11938.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 #11938
    
----
commit 66b1a3ff285f7147774e85738d2904794ad305b5
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-23T20:34:22Z

    [SPARK-14014][SQL] Replace existing catalog with SessionCatalog
    
    ## What changes were proposed in this pull request?
    
    `SessionCatalog`, introduced in #11750, is a catalog that keeps track of temporary functions and tables, and delegates metastore operations to `ExternalCatalog`. This functionality overlaps a lot with the existing `analysis.Catalog`.
    
    As of this commit, `SessionCatalog` and `ExternalCatalog` will no longer be dead code. There are still things that need to be done after this patch, namely:
    - SPARK-14013: Properly implement temporary functions in `SessionCatalog`
    - SPARK-13879: Decide which DDL/DML commands to support natively in Spark
    - SPARK-?????: Implement the ones we do want to support through `SessionCatalog`.
    - SPARK-?????: Merge SQL/HiveContext
    
    ## How was this patch tested?
    
    This is largely a refactoring task so there are no new tests introduced. The particularly relevant tests are `SessionCatalogSuite` and `ExternalCatalogSuite`.
    
    Author: Andrew Or <an...@databricks.com>
    Author: Yin Huai <yh...@databricks.com>
    
    Closes #11836 from andrewor14/use-session-catalog.

commit 6b4a1246f34f51077f89551cab011036f9a7d43d
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-23T21:09:51Z

    Reset all properties after each test

commit 70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-23T21:15:16Z

    Enable HiveContextSuite

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201036853
  
    **[Test build #2683 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2683/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200948367
  
    **[Test build #2678 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2678/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57767303
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/commands.scala ---
    @@ -71,7 +71,8 @@ case class DropTable(
         }
         hiveContext.invalidateTable(tableName)
         hiveContext.runSqlHive(s"DROP TABLE $ifExistsClause$tableName")
    -    hiveContext.sessionState.catalog.unregisterTable(TableIdentifier(tableName))
    +    hiveContext.sessionState.catalog.dropTable(
    +      TableIdentifier(tableName), ignoreIfNotExists = true)
    --- End diff --
    
    no, `SessionCatalog` calls `HiveCatalog` internally so the state will be stored in the metastore


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201154850
  
    Test failure was not related. The latest commit passed tests 4 times in a row so I'm going to merge this.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201158825
  
    @andrewor14 in the future we should make the pr description the same as the previous one, with your latest addendum. Otherwise it is very difficult to track once it is committed.



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201087612
  
    **[Test build #54126 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54126/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200948329
  
    **[Test build #2677 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2677/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201087156
  
    **[Test build #2692 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2692/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201076119
  
    **[Test build #2687 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2687/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait TestHiveSingleton extends SparkFunSuite with BeforeAndAfterAll `
      * `class HiveMetastoreCatalogSuite extends TestHiveSingleton `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201081052
  
    **[Test build #54095 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54095/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait TestHiveSingleton extends SparkFunSuite with BeforeAndAfterAll `
      * `class HiveMetastoreCatalogSuite extends TestHiveSingleton `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201118417
  
    **[Test build #2689 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2689/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait TestHiveSingleton extends SparkFunSuite with BeforeAndAfterAll `
      * `class HiveMetastoreCatalogSuite extends TestHiveSingleton `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57422939
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala ---
    @@ -31,17 +32,34 @@ import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
      * proxy to the underlying metastore (e.g. Hive Metastore) and it also manages temporary
      * tables and functions of the Spark Session that it belongs to.
      */
    -class SessionCatalog(externalCatalog: ExternalCatalog) {
    +class SessionCatalog(externalCatalog: ExternalCatalog, conf: CatalystConf) {
       import ExternalCatalog._
     
    -  private[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    -  private[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
    +  def this(externalCatalog: ExternalCatalog) {
    +    this(externalCatalog, new SimpleCatalystConf(true))
    +  }
    +
    +  protected[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    +  protected[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
     
       // Note: we track current database here because certain operations do not explicitly
       // specify the database (e.g. DROP TABLE my_table). In these cases we must first
       // check whether the temporary table or function exists, then, if not, operate on
       // the corresponding item in the current database.
    -  private[this] var currentDb = "default"
    +  protected[this] var currentDb = {
    +    val defaultName = "default"
    +    val defaultDbDefinition = CatalogDatabase(defaultName, "default database", "", Map())
    --- End diff --
    
    I got this error when trying to do it:
    
    ```
    org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:java.lang.IllegalArgumentException: Can not create a Path from an empty string);
    ```


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201121024
  
    **[Test build #2693 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2693/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201077181
  
    **[Test build #2683 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2683/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait TestHiveSingleton extends SparkFunSuite with BeforeAndAfterAll `
      * `class HiveMetastoreCatalogSuite extends TestHiveSingleton `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201087105
  
    **[Test build #2689 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2689/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201120463
  
    **[Test build #2692 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2692/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201081173
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54095/
    Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201003971
  
    **[Test build #2677 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2677/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201037224
  
    **[Test build #2687 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2687/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201037819
  
    **[Test build #54095 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54095/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200942639
  
    **[Test build #54060 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54060/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201120395
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54126/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201119104
  
    **[Test build #2691 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2691/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201004868
  
    **[Test build #2681 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2681/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57447378
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala ---
    @@ -31,17 +32,34 @@ import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
      * proxy to the underlying metastore (e.g. Hive Metastore) and it also manages temporary
      * tables and functions of the Spark Session that it belongs to.
      */
    -class SessionCatalog(externalCatalog: ExternalCatalog) {
    +class SessionCatalog(externalCatalog: ExternalCatalog, conf: CatalystConf) {
       import ExternalCatalog._
     
    -  private[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    -  private[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
    +  def this(externalCatalog: ExternalCatalog) {
    +    this(externalCatalog, new SimpleCatalystConf(true))
    +  }
    +
    +  protected[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    +  protected[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
     
       // Note: we track current database here because certain operations do not explicitly
       // specify the database (e.g. DROP TABLE my_table). In these cases we must first
       // check whether the temporary table or function exists, then, if not, operate on
       // the corresponding item in the current database.
    -  private[this] var currentDb = "default"
    +  protected[this] var currentDb = {
    +    val defaultName = "default"
    +    val defaultDbDefinition = CatalogDatabase(defaultName, "default database", "", Map())
    --- End diff --
    
    The `currentDb` is also shared by `HiveSessionCatalog`. This is a very important variable in the Session Catalog. We could use the property of this variable in the other functions. If the value is not right, it could cause hidden bugs.
    
    Just after this line, we are trying to create such a default database 
    https://github.com/apache/spark/pull/11938/files#diff-b3f9800839b9b9a1df9da9cbfc01adf8R53
    
    This looks a little bit confusing. Can we assume that the default database in Hive always exists? If so, in `HiveSessionCatalog`, we will not call `createDatabase`. Instead, we can just call `getDatabase` and use the returned value to populate the default `currentDb` property? 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57422856
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala ---
    @@ -31,17 +32,34 @@ import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
      * proxy to the underlying metastore (e.g. Hive Metastore) and it also manages temporary
      * tables and functions of the Spark Session that it belongs to.
      */
    -class SessionCatalog(externalCatalog: ExternalCatalog) {
    +class SessionCatalog(externalCatalog: ExternalCatalog, conf: CatalystConf) {
       import ExternalCatalog._
     
    -  private[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    -  private[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
    +  def this(externalCatalog: ExternalCatalog) {
    +    this(externalCatalog, new SimpleCatalystConf(true))
    +  }
    +
    +  protected[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    +  protected[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
     
       // Note: we track current database here because certain operations do not explicitly
       // specify the database (e.g. DROP TABLE my_table). In these cases we must first
       // check whether the temporary table or function exists, then, if not, operate on
       // the corresponding item in the current database.
    -  private[this] var currentDb = "default"
    +  protected[this] var currentDb = {
    +    val defaultName = "default"
    +    val defaultDbDefinition = CatalogDatabase(defaultName, "default database", "", Map())
    --- End diff --
    
    Sorry, @andrewor14  I have a very late comment. the default `locationUri` is an empty string? Is that allowed? 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201036932
  
    **[Test build #2684 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2684/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201076121
  
    **[Test build #2684 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2684/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait TestHiveSingleton extends SparkFunSuite with BeforeAndAfterAll `
      * `class HiveMetastoreCatalogSuite extends TestHiveSingleton `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57456787
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala ---
    @@ -31,17 +32,34 @@ import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
      * proxy to the underlying metastore (e.g. Hive Metastore) and it also manages temporary
      * tables and functions of the Spark Session that it belongs to.
      */
    -class SessionCatalog(externalCatalog: ExternalCatalog) {
    +class SessionCatalog(externalCatalog: ExternalCatalog, conf: CatalystConf) {
       import ExternalCatalog._
     
    -  private[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    -  private[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
    +  def this(externalCatalog: ExternalCatalog) {
    +    this(externalCatalog, new SimpleCatalystConf(true))
    +  }
    +
    +  protected[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    +  protected[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
     
       // Note: we track current database here because certain operations do not explicitly
       // specify the database (e.g. DROP TABLE my_table). In these cases we must first
       // check whether the temporary table or function exists, then, if not, operate on
       // the corresponding item in the current database.
    -  private[this] var currentDb = "default"
    +  protected[this] var currentDb = {
    +    val defaultName = "default"
    +    val defaultDbDefinition = CatalogDatabase(defaultName, "default database", "", Map())
    --- End diff --
    
    In the `HiveSessionCatalog`, we can get the default path by: 
    ```
      override def getDefaultPath: String = client.getConf(HiveConf.ConfVars.METASTOREWAREHOUSE.varname,
        HiveConf.ConfVars.METASTOREWAREHOUSE.defaultStrVal)
    ```
    It might not be useful in this case. I am just trying to implement the `CreateDatabase` DDL.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201087136
  
    **[Test build #2691 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2691/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200998452
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201120392
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200997955
  
    **[Test build #54060 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54060/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201120245
  
    **[Test build #54126 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54126/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201081168
  
    Merged build finished. Test FAILed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200948441
  
    **[Test build #2679 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2679/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201087176
  
    **[Test build #2693 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2693/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by andrewor14 <gi...@git.apache.org>.
Github user andrewor14 commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57427154
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala ---
    @@ -31,17 +32,34 @@ import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
      * proxy to the underlying metastore (e.g. Hive Metastore) and it also manages temporary
      * tables and functions of the Spark Session that it belongs to.
      */
    -class SessionCatalog(externalCatalog: ExternalCatalog) {
    +class SessionCatalog(externalCatalog: ExternalCatalog, conf: CatalystConf) {
       import ExternalCatalog._
     
    -  private[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    -  private[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
    +  def this(externalCatalog: ExternalCatalog) {
    +    this(externalCatalog, new SimpleCatalystConf(true))
    +  }
    +
    +  protected[this] val tempTables = new ConcurrentHashMap[String, LogicalPlan]
    +  protected[this] val tempFunctions = new ConcurrentHashMap[String, CatalogFunction]
     
       // Note: we track current database here because certain operations do not explicitly
       // specify the database (e.g. DROP TABLE my_table). In these cases we must first
       // check whether the temporary table or function exists, then, if not, operate on
       // the corresponding item in the current database.
    -  private[this] var currentDb = "default"
    +  protected[this] var currentDb = {
    +    val defaultName = "default"
    +    val defaultDbDefinition = CatalogDatabase(defaultName, "default database", "", Map())
    --- End diff --
    
    In the Hive case the default database should already exist in the metastore, so this won't do anything, right?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200948602
  
    **[Test build #2681 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2681/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200999202
  
    **[Test build #2678 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2678/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200998457
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54060/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201000423
  
    **[Test build #2680 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2680/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-200948473
  
    **[Test build #2680 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2680/consoleFull)** for PR 11938 at commit [`70530cf`](https://github.com/apache/spark/commit/70530cf3cd0a68a3dd0ad6b0a7d546c1cf5698ef).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201087118
  
    **[Test build #2690 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2690/consoleFull)** for PR 11938 at commit [`94c5dbe`](https://github.com/apache/spark/commit/94c5dbe095adc79a1cafad9019693671b26ae633).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201037129
  
    **[Test build #2686 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2686/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201036991
  
    **[Test build #2685 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2685/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/11938#issuecomment-201076266
  
    **[Test build #2685 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2685/consoleFull)** for PR 11938 at commit [`dbcdce6`](https://github.com/apache/spark/commit/dbcdce607b7ff4bff75d2694daea2af5b2ca2dc4).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait TestHiveSingleton extends SparkFunSuite with BeforeAndAfterAll `
      * `class HiveMetastoreCatalogSuite extends TestHiveSingleton `


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request: [SPARK-14014][SQL] Integrate session catalog (...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11938#discussion_r57678951
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/commands.scala ---
    @@ -71,7 +71,8 @@ case class DropTable(
         }
         hiveContext.invalidateTable(tableName)
         hiveContext.runSqlHive(s"DROP TABLE $ifExistsClause$tableName")
    -    hiveContext.sessionState.catalog.unregisterTable(TableIdentifier(tableName))
    +    hiveContext.sessionState.catalog.dropTable(
    +      TableIdentifier(tableName), ignoreIfNotExists = true)
    --- End diff --
    
    @andrewor14 @yhuai Sorry, I have a question about this. 
    
    When doing `Drop Database`, the changes in my PR affect both `SQLContext` and `HiveContext`. After reading this, I think we need to call `runSqlHive` when the target is Hive tables. Is my understanding is right? Thank you!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org