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/19 00:03:48 UTC

[GitHub] spark pull request: [SPARK-14014] [SQL] Replace existing catalog w...

GitHub user andrewor14 opened a pull request:

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

    [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`.


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

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

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

    https://github.com/apache/spark/pull/11836.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 #11836
    
----
commit 9130563d025c9b3f7307c84b9b96e61a1f18091b
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-16T22:50:36Z

    Squashed commit of the following:
    
    commit ad43a5ffdeeb881aaed8944971b63a27d1f4257f
    Author: Andrew Or <an...@databricks.com>
    Date:   Wed Mar 16 14:35:02 2016 -0700
    
        Expand test scope + clean up test code
    
    commit 08969cdcaf8196a30a3c879f956a8386fe400695
    Author: Andrew Or <an...@databricks.com>
    Date:   Wed Mar 16 13:21:50 2016 -0700
    
        Fix tests
    
    commit 6d9fa2f946ac93ebc95a9f25cf515fb0ea54b17c
    Author: Andrew Or <an...@databricks.com>
    Date:   Wed Mar 16 12:31:52 2016 -0700
    
        Keep track of current database in SessionCatalog
    
        This allows us to not pass it into every single method like
        we used to before this commit.
    
    commit ff1c2c4661986622e8071a39922e25033b3e62ab
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 19:42:22 2016 -0700
    
        Add TODO
    
    commit 8c84dd803829ffcb8c82ee2f593ef58c3c5c94c9
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 19:41:30 2016 -0700
    
        Implement tests for functions
    
    commit 3da16fb3473b750f13ffcbbb8aaf9a7de7292897
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 19:04:03 2016 -0700
    
        Implement tests for table partitions
    
    commit 794744565269bb9ffb00f8d7a81d7b703251f956
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 18:52:30 2016 -0700
    
        Implement tests for databases and tables
    
    commit 2f5121b43c938b2b585de0c3d80680c0ad5a8a7d
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 16:59:38 2016 -0700
    
        Fix infinite loop (woops)
    
    commit d3f252d4d21b91a22dd7277f983f84daa56d65b5
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 16:12:55 2016 -0700
    
        Refactor CatalogTestCases to make methods accessible
    
    commit caa4013e457a46ef0b8c3a2291cb375eb9064972
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 15:44:23 2016 -0700
    
        Clean up duplicate code in Table/FunctionIdentifier
    
    commit 90ccdbb22bd8baf8caf839047148ebfd326b3593
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 15:33:30 2016 -0700
    
        Fix style
    
    commit 5587a4995634af44ceecc9755165eb9a02bc0e5b
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 15:32:38 2016 -0700
    
        Implement SessionCatalog using ExternalCatalog
    
    commit 196f7ce1b9cfdcd607e363be10716c2dec409bd2
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 14:39:22 2016 -0700
    
        Document and clean up function methods
    
    commit 6d530a919c2f61e69d970625f77b99df5c93b019
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 14:38:50 2016 -0700
    
        Fix tests
    
    commit 2118212a6b5314838d322169c756714d9670d9ac
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 14:33:20 2016 -0700
    
        Refactor CatalogFunction to use FunctionIdentifier
    
    commit dd1fbaef9f53cb61cf726b95fe2bd1a845afa2c3
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 14:22:37 2016 -0700
    
        Refactor CatalogTable to use TableIdentifier
    
        This is a standalone commit such that in the future we can split
        it out into a separate patch if preferrable.
    
    commit 39a153c1b5ac495766eed13c5bb5e5f1135a4e4f
    Author: Andrew Or <an...@databricks.com>
    Date:   Tue Mar 15 13:53:42 2016 -0700
    
        Take into account current database in table methods
    
    commit 5bf695c686d84df500b36713b2ef86226615f3c6
    Author: Andrew Or <an...@databricks.com>
    Date:   Mon Mar 14 17:14:59 2016 -0700
    
        Do the same for functions and partitions
    
    commit 1d12578708da845fe309d3aae1dcdadfee1dee89
    Author: Andrew Or <an...@databricks.com>
    Date:   Mon Mar 14 16:27:11 2016 -0700
    
        Clean up table method signatures + add comments
    
    commit 98c8a3b922168b843fe648664fc0e8ac2f930472
    Author: Andrew Or <an...@databricks.com>
    Date:   Thu Mar 10 16:35:35 2016 -0800
    
        Merge in @yhuai's changes

commit aa80f9cbf232d1d7251e5e7272e0d71a2cf70cad
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-17T00:24:18Z

    Refactor SQLContext etc. to take in ExternalCatalog
    
    We need to be able to pass in ExternalCatalog in the constructor
    of SQLContext and subclasses because these should be persistent
    across sessions. Unfortunately without significant refactoring
    in the HiveContext and TestHive code we cannot make this simple
    change happen.

commit 1f1dd007124ab92ff7f064322216c934fbf497c1
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-17T18:48:31Z

    Attempt to remove old catalog from SessionState
    
    This failed because SessionCatalog does not implement
    refreshTable. This is a bigger problem because SessionCatalog
    has no notion of caching tables in the first place and so it
    doesn't really make sense to implement refreshTable. More
    refactoring involving HiveMetastoreCatalog is required to
    make this work.

commit 5daa696a9c02e0ab87d658c735472ce24e936261
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-17T19:07:20Z

    Merge branch 'master' of github.com:apache/spark into use-session-catalog

commit 71a01e04859f307ff11dda3cabcb7188acb83117
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-17T19:14:38Z

    Fix style

commit 9f5154f46b6e78aa74f6a1f86070657ba31c6c03
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-17T22:16:37Z

    Replace all usages of analysis.Catalog
    
    This commit deletes the trait analysis.Catalog and all of its
    subclasses, with one notable exception: HiveMetastoreCatalog
    is kept because a lot of existing functionality (like caching
    data source tables) are still needed. All other occurrences
    are now replaced with SessionCatalog.
    
    Unfortunately, because HiveMetastoreCatalog is a massive
    sprawl of unmaintainable code, there is no clean way to
    integrate it nicely with the new HiveCatalog. The path of
    least resistance, then, route previous usages of
    HiveMetastoreCatalog through HiveCatalog. This requires
    some whacky initialization order hacks because HMC takes
    in HiveContext but HiveContext takes in HiveCatalog.

commit 78cbcbd28574c7d1711c7d5b6746f5d9d5b7fa69
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-18T20:24:13Z

    Fix tests
    
    The biggest change here is moving HiveMetastoreCatalog from
    HiveCatalog (the external one) to HiveSessionCatalog (the session
    specific one). This is needed because HMC depends on a lot of
    session specific things for, e.g. creating data source tables.
    This was failing tests that do things with multiple sessions,
    i.e. HiveQuerySuite.

commit 5e1648074ffb96f1b2104dc5ea3d78d25e505181
Author: Andrew Or <an...@databricks.com>
Date:   2016-03-18T22:52:00Z

    Fix tests round 2
    
    There were some issues with case sensitivity analysis and error
    messages not being exactly as expected. The latter is now relaxed
    where possible.

----


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199450835
  
    **[Test build #53707 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53707/consoleFull)** for PR 11836 at commit [`561ca3c`](https://github.com/apache/spark/commit/561ca3ce16d4e4fbd1bc77c4484cefeed45f9f7d).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200044978
  
    **[Test build #53823 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53823/consoleFull)** for PR 11836 at commit [`16a54ba`](https://github.com/apache/spark/commit/16a54bad76a8297f15417ba931d20c4d86092c84).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200092956
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56745522
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -81,15 +83,31 @@ class HiveContext private[hive](
         sc: SparkContext,
         cacheManager: CacheManager,
         listener: SQLListener,
    -    @transient private val execHive: HiveClientImpl,
    -    @transient private val metaHive: HiveClient,
    -    isRootContext: Boolean)
    -  extends SQLContext(sc, cacheManager, listener, isRootContext) with Logging {
    +    @transient protected[hive] val executionHive: HiveClientImpl,
    --- End diff --
    
    iirc it's used to find temp functions and the current database. we are doing those ourselves now, no?



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199423222
  
    **[Test build #53703 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53703/consoleFull)** for PR 11836 at commit [`19750d7`](https://github.com/apache/spark/commit/19750d74230e1839c0b678be946b79e5afe43261).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56752346
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -85,6 +85,13 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         withClient { getTable(db, table) }
       }
     
    +  /**
    +   * Switch our client to one that belongs to the new session.
    +   */
    +  def newSession(newClient: HiveClient): this.type = {
    --- End diff --
    
    just talked to @yhuai offline. I don't think we need this. The whole reason why I did something like this is because `HiveClient` also has session-specific stuff, but as long as we use the root `HiveClient` (the first one) then we're fine.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198766253
  
    **[Test build #53621 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53621/consoleFull)** for PR 11836 at commit [`4b37d7a`](https://github.com/apache/spark/commit/4b37d7aae3bdaaf61dba18d23dae2c7da9938a5f).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200527942
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53955/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200201736
  
    oh shit - conflict.



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56756230
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    ListTablesSuite


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200145722
  
    ah only one test failure now 
    
    ```
    [info] - HiveContext can access `spark.sql.*` configs *** FAILED *** (5 seconds, 654 milliseconds)
    [info]   java.lang.reflect.InvocationTargetException:
    [info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [info]   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    [info]   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    [info]   at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    [info]   at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(IsolatedClientLoader.scala:257)
    [info]   at org.apache.spark.sql.hive.HiveContext$.newClientForMetadata(HiveContext.scala:704)
    [info]   at org.apache.spark.sql.hive.HiveContext$.org$apache$spark$sql$hive$HiveContext$$newClientForMetadata(HiveContext.scala:601)
    [info]   at org.apache.spark.sql.hive.HiveContext.<init>(HiveContext.scala:108)
    [info]   at org.apache.spark.sql.hive.HiveContextSuite$$anonfun$1.apply$mcV$sp(HiveContextSuite.scala:29)
    ```


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198766157
  
    The latest commit should pass tests. Note that I've ignored a test in `CliSuite` because I have no idea why the future timed out even after investigating for 30 minutes. It's an end-to-end test with almost no intermediate output so it's would much longer to debug the root cause. If that's the only failing test then I'd prefer to fix it after this patch gets merged so we unblock progress on the DDL stuff.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200097877
  
    **[Test build #53856 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53856/consoleFull)** for PR 11836 at commit [`e552558`](https://github.com/apache/spark/commit/e5525581d6b92b4306076fae75a7321fe346e650).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200562119
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200527934
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199500576
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53702/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198610588
  
    **[Test build #53582 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53582/consoleFull)** for PR 11836 at commit [`c439280`](https://github.com/apache/spark/commit/c439280820a3478c45b64de8c605b0cc0f96e1a1).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200187640
  
    @andrewor14 Let's create a jira for that ignored test :)


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200458734
  
    **[Test build #53952 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53952/consoleFull)** for PR 11836 at commit [`c53f483`](https://github.com/apache/spark/commit/c53f483266475943e0fc5ac82ca28d973c4ff6f5).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r57026840
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -666,6 +468,241 @@ private[hive] object HiveContext {
         defaultValue = Some(true),
         doc = "When set to true, Hive Thrift server executes SQL queries in an asynchronous way.")
     
    +  /**
    +   * The version of the hive client that will be used to communicate with the metastore.  Note that
    +   * this does not necessarily need to be the same version of Hive that is used internally by
    +   * Spark SQL for execution.
    +   */
    +  private def hiveMetastoreVersion(conf: SQLConf): String = {
    +    conf.getConf(HIVE_METASTORE_VERSION)
    +  }
    +
    +  /**
    +   * The location of the jars that should be used to instantiate the HiveMetastoreClient.  This
    +   * property can be one of three options:
    +   *  - a classpath in the standard format for both hive and hadoop.
    +   *  - builtin - attempt to discover the jars that were used to load Spark SQL and use those. This
    +   *              option is only valid when using the execution version of Hive.
    +   *  - maven - download the correct version of hive on demand from maven.
    +   */
    +  private def hiveMetastoreJars(conf: SQLConf): String = {
    +    conf.getConf(HIVE_METASTORE_JARS)
    +  }
    +
    +  /**
    +   * A comma separated list of class prefixes that should be loaded using the classloader that
    +   * is shared between Spark SQL and a specific version of Hive. An example of classes that should
    +   * be shared is JDBC drivers that are needed to talk to the metastore. Other classes that need
    +   * to be shared are those that interact with classes that are already shared.  For example,
    +   * custom appenders that are used by log4j.
    +   */
    +  private def hiveMetastoreSharedPrefixes(conf: SQLConf): Seq[String] = {
    +    conf.getConf(HIVE_METASTORE_SHARED_PREFIXES).filterNot(_ == "")
    +  }
    +
    +  /**
    +   * A comma separated list of class prefixes that should explicitly be reloaded for each version
    +   * of Hive that Spark SQL is communicating with.  For example, Hive UDFs that are declared in a
    +   * prefix that typically would be shared (i.e. org.apache.spark.*)
    +   */
    +  private def hiveMetastoreBarrierPrefixes(conf: SQLConf): Seq[String] = {
    +    conf.getConf(HIVE_METASTORE_BARRIER_PREFIXES).filterNot(_ == "")
    +  }
    +
    +  /**
    +   * Configurations needed to create a [[HiveClient]].
    +   */
    +  private[hive] def hiveClientConfigurations(hiveconf: HiveConf): Map[String, String] = {
    +    // Hive 0.14.0 introduces timeout operations in HiveConf, and changes default values of a bunch
    +    // of time `ConfVar`s by adding time suffixes (`s`, `ms`, and `d` etc.).  This breaks backwards-
    +    // compatibility when users are trying to connecting to a Hive metastore of lower version,
    +    // because these options are expected to be integral values in lower versions of Hive.
    +    //
    +    // Here we enumerate all time `ConfVar`s and convert their values to numeric strings according
    +    // to their output time units.
    +    Seq(
    +      ConfVars.METASTORE_CLIENT_CONNECT_RETRY_DELAY -> TimeUnit.SECONDS,
    +      ConfVars.METASTORE_CLIENT_SOCKET_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.METASTORE_CLIENT_SOCKET_LIFETIME -> TimeUnit.SECONDS,
    +      ConfVars.HMSHANDLERINTERVAL -> TimeUnit.MILLISECONDS,
    +      ConfVars.METASTORE_EVENT_DB_LISTENER_TTL -> TimeUnit.SECONDS,
    +      ConfVars.METASTORE_EVENT_CLEAN_FREQ -> TimeUnit.SECONDS,
    +      ConfVars.METASTORE_EVENT_EXPIRY_DURATION -> TimeUnit.SECONDS,
    +      ConfVars.METASTORE_AGGREGATE_STATS_CACHE_TTL -> TimeUnit.SECONDS,
    +      ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_WRITER_WAIT -> TimeUnit.MILLISECONDS,
    +      ConfVars.METASTORE_AGGREGATE_STATS_CACHE_MAX_READER_WAIT -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVES_AUTO_PROGRESS_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_LOG_INCREMENTAL_PLAN_PROGRESS_INTERVAL -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_STATS_JDBC_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_STATS_RETRIES_WAIT -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_LOCK_SLEEP_BETWEEN_RETRIES -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_ZOOKEEPER_SESSION_TIMEOUT -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_ZOOKEEPER_CONNECTION_BASESLEEPTIME -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_TXN_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_COMPACTOR_WORKER_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_COMPACTOR_CHECK_INTERVAL -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_COMPACTOR_CLEANER_RUN_INTERVAL -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_SERVER2_THRIFT_HTTP_MAX_IDLE_TIME -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_SERVER2_THRIFT_HTTP_WORKER_KEEPALIVE_TIME -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_SERVER2_THRIFT_HTTP_COOKIE_MAX_AGE -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_SERVER2_THRIFT_LOGIN_BEBACKOFF_SLOT_LENGTH -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_SERVER2_THRIFT_LOGIN_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_SERVER2_THRIFT_WORKER_KEEPALIVE_TIME -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_SERVER2_ASYNC_EXEC_SHUTDOWN_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_SERVER2_ASYNC_EXEC_KEEPALIVE_TIME -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_SERVER2_LONG_POLLING_TIMEOUT -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_SERVER2_SESSION_CHECK_INTERVAL -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_SERVER2_IDLE_SESSION_TIMEOUT -> TimeUnit.MILLISECONDS,
    +      ConfVars.HIVE_SERVER2_IDLE_OPERATION_TIMEOUT -> TimeUnit.MILLISECONDS,
    +      ConfVars.SERVER_READ_SOCKET_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.HIVE_LOCALIZE_RESOURCE_WAIT_INTERVAL -> TimeUnit.MILLISECONDS,
    +      ConfVars.SPARK_CLIENT_FUTURE_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.SPARK_JOB_MONITOR_TIMEOUT -> TimeUnit.SECONDS,
    +      ConfVars.SPARK_RPC_CLIENT_CONNECT_TIMEOUT -> TimeUnit.MILLISECONDS,
    +      ConfVars.SPARK_RPC_CLIENT_HANDSHAKE_TIMEOUT -> TimeUnit.MILLISECONDS
    +    ).map { case (confVar, unit) =>
    +      confVar.varname -> hiveconf.getTimeVar(confVar, unit).toString
    +    }.toMap
    +  }
    +
    +  /**
    +   * Create a [[HiveClient]] used for execution.
    +   *
    +   * Currently this must always be Hive 13 as this is the version of Hive that is packaged
    +   * with Spark SQL. This copy of the client is used for execution related tasks like
    +   * registering temporary functions or ensuring that the ThreadLocal SessionState is
    +   * correctly populated.  This copy of Hive is *not* used for storing persistent metadata,
    +   * and only point to a dummy metastore in a temporary directory.
    +   */
    +  protected[hive] def newClientForExecution(
    +      conf: SparkConf,
    +      hadoopConf: Configuration): HiveClientImpl = {
    +    logInfo(s"Initializing execution hive, version $hiveExecutionVersion")
    +    val loader = new IsolatedClientLoader(
    +      version = IsolatedClientLoader.hiveVersion(hiveExecutionVersion),
    +      sparkConf = conf,
    +      execJars = Seq(),
    +      hadoopConf = hadoopConf,
    +      config = newTemporaryConfiguration(useInMemoryDerby = true),
    +      isolationOn = false,
    +      baseClassLoader = Utils.getContextOrSparkClassLoader)
    +    loader.createClient().asInstanceOf[HiveClientImpl]
    +  }
    +
    +  /**
    +   * Create a [[HiveClient]] used to retrieve metadata from the Hive MetaStore.
    +   *
    +   * The version of the Hive client that is used here must match the metastore that is configured
    +   * in the hive-site.xml file.
    +   */
    +  private def newClientForMetadata(conf: SparkConf, hadoopConf: Configuration): HiveClient = {
    +    val hiveConf = new HiveConf(hadoopConf, classOf[HiveConf])
    +    val configurations = hiveClientConfigurations(hiveConf)
    +    newClientForMetadata(conf, hiveConf, hadoopConf, configurations)
    +  }
    +
    +  protected[hive] def newClientForMetadata(
    +      conf: SparkConf,
    +      hiveConf: HiveConf,
    +      hadoopConf: Configuration,
    +      configurations: Map[String, String]): HiveClient = {
    +    val sqlConf = new SQLConf
    +    val hiveMetastoreVersion = HiveContext.hiveMetastoreVersion(sqlConf)
    +    val hiveMetastoreJars = HiveContext.hiveMetastoreJars(sqlConf)
    +    val hiveMetastoreSharedPrefixes = HiveContext.hiveMetastoreSharedPrefixes(sqlConf)
    +    val hiveMetastoreBarrierPrefixes = HiveContext.hiveMetastoreBarrierPrefixes(sqlConf)
    --- End diff --
    
    When we create the sqlConf in this method, that conf object only hold default values and do not have settings of these four keys. We need to populate the sqlConf by copy sql related keys from the spark conf to it like what we do at https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/SQLContext.scala#L206-L228. Then, we will get the correct values of these four keys. 
    
    This will help us fix `HiveUDFSuite`.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56753374
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -0,0 +1,104 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.hive
    +
    +import org.apache.spark.sql.catalyst.TableIdentifier
    +import org.apache.spark.sql.catalyst.catalog.SessionCatalog
    +import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
    +import org.apache.spark.sql.catalyst.rules.Rule
    +import org.apache.spark.sql.execution.datasources.BucketSpec
    +import org.apache.spark.sql.hive.client.HiveClient
    +import org.apache.spark.sql.internal.SQLConf
    +import org.apache.spark.sql.types.StructType
    +
    +
    +class HiveSessionCatalog(
    +    externalCatalog: HiveCatalog,
    +    client: HiveClient,
    +    context: HiveContext,
    +    conf: SQLConf)
    +  extends SessionCatalog(externalCatalog, conf) {
    +
    +  override def setCurrentDatabase(db: String): Unit = {
    +    super.setCurrentDatabase(db)
    +    client.setCurrentDatabase(db)
    +  }
    +
    +  override def lookupRelation(name: TableIdentifier, alias: Option[String]): LogicalPlan = {
    --- End diff --
    
    well we still need the logic in `HiveMetastoreCatalog`. It might be refactored and moved to the external catalog.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200092957
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53849/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198585770
  
    **[Test build #53585 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53585/consoleFull)** for PR 11836 at commit [`34948a5`](https://github.com/apache/spark/commit/34948a5857453b9693113e57915a5d6d6e328fca).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199526269
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53707/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198615299
  
    **[Test build #53587 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53587/consoleFull)** for PR 11836 at commit [`f089e2b`](https://github.com/apache/spark/commit/f089e2bebacc000ac65a0a14b1124c0c5a1e860c).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200087082
  
    **[Test build #53848 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53848/consoleFull)** for PR 11836 at commit [`3439dc2`](https://github.com/apache/spark/commit/3439dc216dbaf6b7ab23246d36d9ba4bf52847ed).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199489257
  
    **[Test build #53713 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53713/consoleFull)** for PR 11836 at commit [`b9de78c`](https://github.com/apache/spark/commit/b9de78c980bca3738cb493056326cab1c81ed343).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200092938
  
    **[Test build #53849 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53849/consoleFull)** for PR 11836 at commit [`3439dc2`](https://github.com/apache/spark/commit/3439dc216dbaf6b7ab23246d36d9ba4bf52847ed).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56745379
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    it fails existing tests


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200088815
  
    **[Test build #53849 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53849/consoleFull)** for PR 11836 at commit [`3439dc2`](https://github.com/apache/spark/commit/3439dc216dbaf6b7ab23246d36d9ba4bf52847ed).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56755343
  
    --- 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())
    +    // Initialize default database if it doesn't already exist
    +    createDatabase(defaultDbDefinition, ignoreIfExists = true)
    +    defaultName
    +  }
    +
    +  /**
    +   * Format table name, taking into account case sensitivity.
    +   */
    +  protected[this] def formatTableName(name: String): String = {
    +    if (conf.caseSensitiveAnalysis) name else name.toLowerCase
    --- End diff --
    
    Later, it will be good to use this to handle other db name as well for the consistency reason (it will not actually have any effect right now though).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200141553
  
    **[Test build #53848 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53848/consoleFull)** for PR 11836 at commit [`3439dc2`](https://github.com/apache/spark/commit/3439dc216dbaf6b7ab23246d36d9ba4bf52847ed).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200082655
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200038806
  
    **[Test build #53820 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53820/consoleFull)** for PR 11836 at commit [`98751cc`](https://github.com/apache/spark/commit/98751ccf97345883310819655139ead59e877c07).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200439018
  
    Looks like the conflict is introduced by https://github.com/apache/spark/pull/11889/files. Should be pretty minor. But, let me see.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200183941
  
    **[Test build #53856 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53856/consoleFull)** for PR 11836 at commit [`e552558`](https://github.com/apache/spark/commit/e5525581d6b92b4306076fae75a7321fe346e650).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198628679
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198628648
  
    **[Test build #53585 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53585/consoleFull)** for PR 11836 at commit [`34948a5`](https://github.com/apache/spark/commit/34948a5857453b9693113e57915a5d6d6e328fca).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r57109756
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveContextSuite.scala ---
    @@ -0,0 +1,38 @@
    +/*
    +* Licensed to the Apache Software Foundation (ASF) under one or more
    +* contributor license agreements.  See the NOTICE file distributed with
    +* this work for additional information regarding copyright ownership.
    +* The ASF licenses this file to You under the Apache License, Version 2.0
    +* (the "License"); you may not use this file except in compliance with
    +* the License.  You may obtain a copy of the License at
    +*
    +*    http://www.apache.org/licenses/LICENSE-2.0
    +*
    +* Unless required by applicable law or agreed to in writing, software
    +* distributed under the License is distributed on an "AS IS" BASIS,
    +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +* See the License for the specific language governing permissions and
    +* limitations under the License.
    +*/
    +
    +package org.apache.spark.sql.hive
    +
    +import org.apache.spark.SparkFunSuite
    +import org.apache.spark.sql.hive.test.TestHive
    +
    +
    +class HiveContextSuite extends SparkFunSuite {
    +
    +  test("HiveContext can access `spark.sql.*` configs") {
    +    // Avoid creating another SparkContext in the same JVM
    +    val sc = TestHive.sparkContext
    +    val hiveContext = new HiveContext(sc)
    --- End diff --
    
    Since there is already a global singleton, this probably will not work because of the derby connection limitation (inside the JVM, we can have a single connection to a given derby). 


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200249310
  
    **[Test build #53906 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53906/consoleFull)** for PR 11836 at commit [`9519cd8`](https://github.com/apache/spark/commit/9519cd806b1810e75283d4ca86fcb9aaf4d2d320).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200142148
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56752770
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -85,6 +85,13 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         withClient { getTable(db, table) }
       }
     
    +  /**
    +   * Switch our client to one that belongs to the new session.
    +   */
    +  def newSession(newClient: HiveClient): this.type = {
    --- End diff --
    
    yea - if it is going to take a while feel free to do as an add-on pr. it'd be fix tests and great to merge this one asap.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199571504
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53713/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56755640
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -81,15 +83,31 @@ class HiveContext private[hive](
         sc: SparkContext,
         cacheManager: CacheManager,
         listener: SQLListener,
    -    @transient private val execHive: HiveClientImpl,
    -    @transient private val metaHive: HiveClient,
    -    isRootContext: Boolean)
    -  extends SQLContext(sc, cacheManager, listener, isRootContext) with Logging {
    +    @transient protected[hive] val executionHive: HiveClientImpl,
    --- End diff --
    
    We have not changed temp function part. executionHive is still used when we look up Hive UDFs. The next step is to remove the usage of executionHive when we handle Hive UDFs. Then, we should be able to remove executionHive (So, HiveClient is only used to talk to real metastores.).
    
    



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200228984
  
    **[Test build #53900 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53900/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200201544
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199964862
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53792/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198615315
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53587/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200229166
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53900/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198610613
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56866062
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    Ah I see. Our current master can allow you call `SHOW TABLES` with a db that does not actually exist and then we displays all temp tables. This behavior can cause confusion to users because they can think that the database exists. But, later when they call `use` to switch to that non-existent db, they will see an exception.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199526158
  
    **[Test build #53707 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53707/consoleFull)** for PR 11836 at commit [`561ca3c`](https://github.com/apache/spark/commit/561ca3ce16d4e4fbd1bc77c4484cefeed45f9f7d).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200227916
  
    **[Test build #2662 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2662/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).
     * This patch **fails PySpark 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r57201552
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
    @@ -83,26 +154,6 @@ class TestHiveContext(sc: SparkContext) extends HiveContext(sc) {
     
       hiveconf.set("hive.plan.serialization.format", "javaXML")
     
    -  lazy val warehousePath = Utils.createTempDir(namePrefix = "warehouse-")
    -
    -  lazy val scratchDirPath = {
    -    val dir = Utils.createTempDir(namePrefix = "scratch-")
    -    dir.delete()
    -    dir
    -  }
    -
    -  private lazy val temporaryConfig = newTemporaryConfiguration(useInMemoryDerby = false)
    -
    -  /** Sets up the system initially or after a RESET command */
    -  protected override def configure(): Map[String, String] = {
    -    super.configure() ++ temporaryConfig ++ Map(
    --- End diff --
    
    Looks like as long as we make `temporaryConfig` a constant value, it is fine to have 
    ```
    TestHiveContext.hiveClientConfigurations(hiveconf, warehousePath, scratchDirPath)
      .foreach { case (k, v) => metadataHive.runSqlHive(s"SET $k=$v") }
    ```
    in the reset. I feel reset those confs is still needed just in case we override any of those confs.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198575316
  
    **[Test build #53579 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53579/consoleFull)** for PR 11836 at commit [`5e16480`](https://github.com/apache/spark/commit/5e1648074ffb96f1b2104dc5ea3d78d25e505181).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743804
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    why removing 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56769408
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    It just assumes that listing tables of a non-existent database would work. 


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200186037
  
    **[Test build #2663 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2663/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200527374
  
    **[Test build #53955 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53955/consoleFull)** for PR 11836 at commit [`ea1645b`](https://github.com/apache/spark/commit/ea1645bd7cc60ffdf0b7fd2e9ea5db679ec2b9da).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743897
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -0,0 +1,104 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.hive
    +
    +import org.apache.spark.sql.catalyst.TableIdentifier
    +import org.apache.spark.sql.catalyst.catalog.SessionCatalog
    +import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
    +import org.apache.spark.sql.catalyst.rules.Rule
    +import org.apache.spark.sql.execution.datasources.BucketSpec
    +import org.apache.spark.sql.hive.client.HiveClient
    +import org.apache.spark.sql.internal.SQLConf
    +import org.apache.spark.sql.types.StructType
    +
    +
    +class HiveSessionCatalog(
    +    externalCatalog: HiveCatalog,
    +    client: HiveClient,
    +    context: HiveContext,
    +    conf: SQLConf)
    +  extends SessionCatalog(externalCatalog, conf) {
    +
    +  override def setCurrentDatabase(db: String): Unit = {
    +    super.setCurrentDatabase(db)
    +    client.setCurrentDatabase(db)
    +  }
    +
    +  override def lookupRelation(name: TableIdentifier, alias: Option[String]): LogicalPlan = {
    --- End diff --
    
    this should go away in the future 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200186012
  
    **[Test build #2662 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2662/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200082305
  
    **[Test build #53823 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53823/consoleFull)** for PR 11836 at commit [`16a54ba`](https://github.com/apache/spark/commit/16a54bad76a8297f15417ba931d20c4d86092c84).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200185921
  
    OK, now this should pass tests...


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200228298
  
    **[Test build #2665 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2665/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).
     * This patch **fails PySpark 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56756370
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    What was the error?


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198631698
  
    The changes look pretty good. We'd need to make Jenkins pass though.



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198587064
  
    **[Test build #53587 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53587/consoleFull)** for PR 11836 at commit [`f089e2b`](https://github.com/apache/spark/commit/f089e2bebacc000ac65a0a14b1124c0c5a1e860c).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200096804
  
    Hm, something weird is going on with the tests. The latest this please try again.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200165824
  
    test this please


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199964762
  
    **[Test build #53792 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53792/consoleFull)** for PR 11836 at commit [`4133d3f`](https://github.com/apache/spark/commit/4133d3f64747987728a0db227d32d3001e846996).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198572871
  
    @yhuai @rxin


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200186068
  
    **[Test build #2665 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2665/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200080632
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53820/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200082656
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53823/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200227872
  
    looks really close ...


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198795358
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53621/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56755267
  
    --- 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())
    +    // Initialize default database if it doesn't already exist
    +    createDatabase(defaultDbDefinition, ignoreIfExists = true)
    +    defaultName
    +  }
    +
    +  /**
    +   * Format table name, taking into account case sensitivity.
    +   */
    +  protected[this] def formatTableName(name: String): String = {
    +    if (conf.caseSensitiveAnalysis) name else name.toLowerCase
    --- End diff --
    
    Just a note at here. Hive metastore is always case insensitive. So, the case sensitivity setting is mainly for temp tables and temp functions.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200166489
  
    **[Test build #53890 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53890/consoleFull)** for PR 11836 at commit [`e552558`](https://github.com/apache/spark/commit/e5525581d6b92b4306076fae75a7321fe346e650).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200080553
  
    **[Test build #53820 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53820/consoleFull)** for PR 11836 at commit [`98751cc`](https://github.com/apache/spark/commit/98751ccf97345883310819655139ead59e877c07).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class LogisticRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class NaiveBayesModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class KMeansModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class Binarizer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class Bucketizer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class CountVectorizer(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class CountVectorizerModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class DCT(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class ElementwiseProduct(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable,`
      * `class HashingTF(JavaTransformer, HasInputCol, HasOutputCol, HasNumFeatures, JavaMLReadable,`
      * `class IDF(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class IDFModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class MaxAbsScaler(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class MaxAbsScalerModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class MinMaxScaler(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class MinMaxScalerModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class NGram(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class Normalizer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class OneHotEncoder(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class PolynomialExpansion(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable,`
      * `class QuantileDiscretizer(JavaEstimator, HasInputCol, HasOutputCol, HasSeed, JavaMLReadable,`
      * `class RegexTokenizer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class SQLTransformer(JavaTransformer, JavaMLReadable, JavaMLWritable):`
      * `class StandardScaler(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class StandardScalerModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class StringIndexer(JavaEstimator, HasInputCol, HasOutputCol, HasHandleInvalid, JavaMLReadable,`
      * `class StringIndexerModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class IndexToString(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class StopWordsRemover(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class Tokenizer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class VectorAssembler(JavaTransformer, HasInputCols, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class VectorIndexer(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class VectorIndexerModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class VectorSlicer(JavaTransformer, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class Word2VecModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class PCA(JavaEstimator, HasInputCol, HasOutputCol, JavaMLReadable, JavaMLWritable):`
      * `class PCAModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class RFormula(JavaEstimator, HasFeaturesCol, HasLabelCol, JavaMLReadable, JavaMLWritable):`
      * `class RFormulaModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class ChiSqSelector(JavaEstimator, HasFeaturesCol, HasOutputCol, HasLabelCol, JavaMLReadable,`
      * `class ChiSqSelectorModel(JavaModel, JavaMLReadable, JavaMLWritable):`
      * `class PipelineMLWriter(JavaMLWriter):`
      * `class Pipeline(Estimator, MLReadable, MLWritable):`
      * `class PipelineModelMLWriter(JavaMLWriter):`
      * `class PipelineModel(Model, MLReadable, MLWritable):`
      * `class ALSModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class LinearRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class IsotonicRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class AFTSurvivalRegressionModel(JavaModel, JavaMLWritable, JavaMLReadable):`
      * `class MLWriter(object):`
      * `class JavaMLWriter(MLWriter):`
      * `class JavaMLWritable(MLWritable):`
      * `class MLReader(object):`
      * `class JavaMLReader(MLReader):`
      * `class JavaMLReadable(MLReadable):`
      * `  implicit class StringToColumn(val sc: StringContext) `
      * `class HDFSMetadataLog[T: ClassTag](sqlContext: SQLContext, path: String)`
      * `class StreamProgress(`


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200508256
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53952/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199940955
  
    **[Test build #53792 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53792/consoleFull)** for PR 11836 at commit [`4133d3f`](https://github.com/apache/spark/commit/4133d3f64747987728a0db227d32d3001e846996).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199571313
  
    **[Test build #53713 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53713/consoleFull)** for PR 11836 at commit [`b9de78c`](https://github.com/apache/spark/commit/b9de78c980bca3738cb493056326cab1c81ed343).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200562008
  
    **[Test build #53956 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53956/consoleFull)** for PR 11836 at commit [`350bd2e`](https://github.com/apache/spark/commit/350bd2ebc2b44a5e6d3f58325aa9272f13201af6).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198794433
  
    Changes look good to me.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56745391
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -81,15 +83,31 @@ class HiveContext private[hive](
         sc: SparkContext,
         cacheManager: CacheManager,
         listener: SQLListener,
    -    @transient private val execHive: HiveClientImpl,
    -    @transient private val metaHive: HiveClient,
    -    isRootContext: Boolean)
    -  extends SQLContext(sc, cacheManager, listener, isRootContext) with Logging {
    +    @transient protected[hive] val executionHive: HiveClientImpl,
    --- End diff --
    
    what do you mean? The old code also had it.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199563518
  
    retest this please


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56878575
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    seems like we should throw exception when db doesn't exist.
    
    we could do that as a separate pr though


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56753390
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -666,6 +470,241 @@ private[hive] object HiveContext {
         defaultValue = Some(true),
         doc = "When set to true, Hive Thrift server executes SQL queries in an asynchronous way.")
     
    +  /**
    +   * The version of the hive client that will be used to communicate with the metastore.  Note that
    +   * this does not necessarily need to be the same version of Hive that is used internally by
    +   * Spark SQL for execution.
    +   */
    +  private def hiveMetastoreVersion(conf: SQLConf): String = {
    +    conf.getConf(HIVE_METASTORE_VERSION)
    +  }
    +
    +  /**
    +   * The location of the jars that should be used to instantiate the HiveMetastoreClient.  This
    +   * property can be one of three options:
    +   *  - a classpath in the standard format for both hive and hadoop.
    +   *  - builtin - attempt to discover the jars that were used to load Spark SQL and use those. This
    +   *              option is only valid when using the execution version of Hive.
    +   *  - maven - download the correct version of hive on demand from maven.
    +   */
    +  private def hiveMetastoreJars(conf: SQLConf): String = {
    +    conf.getConf(HIVE_METASTORE_JARS)
    +  }
    +
    +  /**
    +   * A comma separated list of class prefixes that should be loaded using the classloader that
    +   * is shared between Spark SQL and a specific version of Hive. An example of classes that should
    +   * be shared is JDBC drivers that are needed to talk to the metastore. Other classes that need
    +   * to be shared are those that interact with classes that are already shared.  For example,
    +   * custom appenders that are used by log4j.
    +   */
    +  private def hiveMetastoreSharedPrefixes(conf: SQLConf): Seq[String] = {
    +    conf.getConf(HIVE_METASTORE_SHARED_PREFIXES).filterNot(_ == "")
    +  }
    +
    +  /**
    +   * A comma separated list of class prefixes that should explicitly be reloaded for each version
    +   * of Hive that Spark SQL is communicating with.  For example, Hive UDFs that are declared in a
    +   * prefix that typically would be shared (i.e. org.apache.spark.*)
    +   */
    +  private def hiveMetastoreBarrierPrefixes(conf: SQLConf): Seq[String] = {
    +    conf.getConf(HIVE_METASTORE_BARRIER_PREFIXES).filterNot(_ == "")
    +  }
    +
    +  /**
    +   * Configurations needed to create a [[HiveClient]].
    +   */
    +  private[hive] def hiveClientConfigurations(hiveconf: HiveConf): Map[String, String] = {
    --- End diff --
    
    I don't understand. This is used to create a `HiveClient`, which happens before we create `HiveCatalog`.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198795357
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200186044
  
    **[Test build #2664 has started](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2664/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199444521
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199500575
  
    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] Replace existing catalog w...

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

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


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56755769
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveSessionCatalog.scala ---
    @@ -0,0 +1,104 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *    http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +package org.apache.spark.sql.hive
    +
    +import org.apache.spark.sql.catalyst.TableIdentifier
    +import org.apache.spark.sql.catalyst.catalog.SessionCatalog
    +import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, SubqueryAlias}
    +import org.apache.spark.sql.catalyst.rules.Rule
    +import org.apache.spark.sql.execution.datasources.BucketSpec
    +import org.apache.spark.sql.hive.client.HiveClient
    +import org.apache.spark.sql.internal.SQLConf
    +import org.apache.spark.sql.types.StructType
    +
    +
    +class HiveSessionCatalog(
    +    externalCatalog: HiveCatalog,
    +    client: HiveClient,
    +    context: HiveContext,
    +    conf: SQLConf)
    +  extends SessionCatalog(externalCatalog, conf) {
    +
    +  override def setCurrentDatabase(db: String): Unit = {
    +    super.setCurrentDatabase(db)
    +    client.setCurrentDatabase(db)
    +  }
    +
    +  override def lookupRelation(name: TableIdentifier, alias: Option[String]): LogicalPlan = {
    --- End diff --
    
    Eventually, we should not need to have a `HiveSessionCatalog`. For now, the main reason that we have it is because  `HiveMetastoreCatalog` is tightly coupled with both Hive and Spark SQL (e.g. the metadata cache's load method reads metadata from Hive metastore and then creates LogicalPlans directly).
    
    (@andrewor14 correct me if I am missing anything)


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56753414
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -85,6 +85,13 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         withClient { getTable(db, table) }
       }
     
    +  /**
    +   * Switch our client to one that belongs to the new session.
    +   */
    +  def newSession(newClient: HiveClient): this.type = {
    --- End diff --
    
    already did it; only ~5 lines change


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198610616
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53582/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200508036
  
    **[Test build #53952 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53952/consoleFull)** for PR 11836 at commit [`c53f483`](https://github.com/apache/spark/commit/c53f483266475943e0fc5ac82ca28d973c4ff6f5).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200184059
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743905
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveQuerySuite.scala ---
    @@ -57,11 +58,14 @@ class HiveQuerySuite extends HiveComparisonTest with BeforeAndAfter {
       }
     
       override def afterAll() {
    -    TestHive.cacheTables = false
    -    TimeZone.setDefault(originalTimeZone)
    -    Locale.setDefault(originalLocale)
    -    sql("DROP TEMPORARY FUNCTION udtf_count2")
    -    super.afterAll()
    +    try {
    --- End diff --
    
    good change!



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200225477
  
    **[Test build #2664 has finished](https://amplab.cs.berkeley.edu/jenkins/job/NewSparkPullRequestBuilder/2664/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).
     * This patch **fails PySpark 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200142151
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53848/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200249565
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r57111259
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/HiveContextSuite.scala ---
    @@ -0,0 +1,38 @@
    +/*
    +* Licensed to the Apache Software Foundation (ASF) under one or more
    +* contributor license agreements.  See the NOTICE file distributed with
    +* this work for additional information regarding copyright ownership.
    +* The ASF licenses this file to You under the Apache License, Version 2.0
    +* (the "License"); you may not use this file except in compliance with
    +* the License.  You may obtain a copy of the License at
    +*
    +*    http://www.apache.org/licenses/LICENSE-2.0
    +*
    +* Unless required by applicable law or agreed to in writing, software
    +* distributed under the License is distributed on an "AS IS" BASIS,
    +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +* See the License for the specific language governing permissions and
    +* limitations under the License.
    +*/
    +
    +package org.apache.spark.sql.hive
    +
    +import org.apache.spark.SparkFunSuite
    +import org.apache.spark.sql.hive.test.TestHive
    +
    +
    +class HiveContextSuite extends SparkFunSuite {
    +
    +  test("HiveContext can access `spark.sql.*` configs") {
    +    // Avoid creating another SparkContext in the same JVM
    +    val sc = TestHive.sparkContext
    +    val hiveContext = new HiveContext(sc)
    --- End diff --
    
    using `TestHive` doesn't work either. I'm just going to ignore the test again...


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200201272
  
    **[Test build #53890 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53890/consoleFull)** for PR 11836 at commit [`e552558`](https://github.com/apache/spark/commit/e5525581d6b92b4306076fae75a7321fe346e650).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r57199331
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/test/TestHive.scala ---
    @@ -83,26 +154,6 @@ class TestHiveContext(sc: SparkContext) extends HiveContext(sc) {
     
       hiveconf.set("hive.plan.serialization.format", "javaXML")
     
    -  lazy val warehousePath = Utils.createTempDir(namePrefix = "warehouse-")
    -
    -  lazy val scratchDirPath = {
    -    val dir = Utils.createTempDir(namePrefix = "scratch-")
    -    dir.delete()
    -    dir
    -  }
    -
    -  private lazy val temporaryConfig = newTemporaryConfiguration(useInMemoryDerby = false)
    --- End diff --
    
    I see why we have to remove 
    ```
    TestHiveContext.hiveClientConfigurations(hiveconf, warehousePath, scratchDirPath)
      .foreach { case (k, v) => metadataHive.runSqlHive(s"SET $k=$v") }
    ```
    in https://github.com/apache/spark/pull/11836/commits/16a54bad76a8297f15417ba931d20c4d86092c84. temporaryConfig was originally a lazy val. But, if we use hiveClientConfigurations, we are actually generate new confs every time we call reset. 


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199444525
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53703/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200184062
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53856/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743812
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -81,15 +83,31 @@ class HiveContext private[hive](
         sc: SparkContext,
         cacheManager: CacheManager,
         listener: SQLListener,
    -    @transient private val execHive: HiveClientImpl,
    -    @transient private val metaHive: HiveClient,
    -    isRootContext: Boolean)
    -  extends SQLContext(sc, cacheManager, listener, isRootContext) with Logging {
    +    @transient protected[hive] val executionHive: HiveClientImpl,
    --- End diff --
    
    Why is there an executionHive?



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200463213
  
    **[Test build #53955 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53955/consoleFull)** for PR 11836 at commit [`ea1645b`](https://github.com/apache/spark/commit/ea1645bd7cc60ffdf0b7fd2e9ea5db679ec2b9da).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r57246398
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    this was done in this patch itself.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200229165
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200174534
  
    I tried `hive/test` locally and I got the following error at `HiveContextSuite`.
    
    ```
    21:43:03.057 ERROR DataNucleus.Datastore.Schema: Failed initialising database.
    Unable to open a test connection to the given database. JDBC url = jdbc:derby:;databaseName=metastore_db;create=true, username = APP. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
    java.sql.SQLException: Failed to start database 'metastore_db' with class loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@25b50060, see the next exception for details.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)
    	at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)
    	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
    	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
    	at org.apache.derby.jdbc.Driver20.connect(Unknown Source)
    	at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)
    	at java.sql.DriverManager.getConnection(DriverManager.java:571)
    	at java.sql.DriverManager.getConnection(DriverManager.java:187)
    	at com.jolbox.bonecp.BoneCP.obtainRawInternalConnection(BoneCP.java:361)
    	at com.jolbox.bonecp.BoneCP.<init>(BoneCP.java:416)
    	at com.jolbox.bonecp.BoneCPDataSource.getConnection(BoneCPDataSource.java:120)
    	at org.datanucleus.store.rdbms.ConnectionFactoryImpl$ManagedConnectionImpl.getConnection(ConnectionFactoryImpl.java:501)
    	at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:298)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    	at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:631)
    	at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
    	at org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.java:1187)
    	at org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
    	at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:775)
    	at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:333)
    	at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:202)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
    	at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
    	at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
    	at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
    	at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:365)
    	at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:394)
    	at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:291)
    	at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:258)
    	at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
    	at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
    	at org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:57)
    	at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:66)
    	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:593)
    	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:571)
    	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:620)
    	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:461)
    	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:66)
    	at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:72)
    	at org.apache.hadoop.hive.metastore.HiveMetaStore.newRetryingHMSHandler(HiveMetaStore.java:5762)
    	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:199)
    	at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.<init>(SessionHiveMetaStoreClient.java:74)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1521)
    	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:86)
    	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:132)
    	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
    	at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:3005)
    	at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3024)
    	at org.apache.hadoop.hive.ql.metadata.Hive.getAllDatabases(Hive.java:1234)
    	at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:174)
    	at org.apache.hadoop.hive.ql.metadata.Hive.<clinit>(Hive.java:166)
    	at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:503)
    	at org.apache.spark.sql.hive.client.HiveClientImpl.<init>(HiveClientImpl.scala:140)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    	at org.apache.spark.sql.hive.client.IsolatedClientLoader.createClient(IsolatedClientLoader.scala:257)
    	at org.apache.spark.sql.hive.HiveContext$.newClientForMetadata(HiveContext.scala:704)
    	at org.apache.spark.sql.hive.HiveContext$.org$apache$spark$sql$hive$HiveContext$$newClientForMetadata(HiveContext.scala:601)
    	at org.apache.spark.sql.hive.HiveContext.<init>(HiveContext.scala:108)
    	at org.apache.spark.sql.hive.HiveContextSuite$$anonfun$1.apply$mcV$sp(HiveContextSuite.scala:29)
    	at org.apache.spark.sql.hive.HiveContextSuite$$anonfun$1.apply(HiveContextSuite.scala:26)
    	at org.apache.spark.sql.hive.HiveContextSuite$$anonfun$1.apply(HiveContextSuite.scala:26)
    	at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
    	at org.scalatest.OutcomeOf$class.outcomeOf(OutcomeOf.scala:85)
    	at org.scalatest.OutcomeOf$.outcomeOf(OutcomeOf.scala:104)
    	at org.scalatest.Transformer.apply(Transformer.scala:22)
    	at org.scalatest.Transformer.apply(Transformer.scala:20)
    	at org.scalatest.FunSuiteLike$$anon$1.apply(FunSuiteLike.scala:166)
    	at org.apache.spark.SparkFunSuite.withFixture(SparkFunSuite.scala:56)
    	at org.scalatest.FunSuiteLike$class.invokeWithFixture$1(FunSuiteLike.scala:163)
    	at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
    	at org.scalatest.FunSuiteLike$$anonfun$runTest$1.apply(FunSuiteLike.scala:175)
    	at org.scalatest.SuperEngine.runTestImpl(Engine.scala:306)
    	at org.scalatest.FunSuiteLike$class.runTest(FunSuiteLike.scala:175)
    	at org.scalatest.FunSuite.runTest(FunSuite.scala:1555)
    	at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
    	at org.scalatest.FunSuiteLike$$anonfun$runTests$1.apply(FunSuiteLike.scala:208)
    	at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:413)
    	at org.scalatest.SuperEngine$$anonfun$traverseSubNodes$1$1.apply(Engine.scala:401)
    	at scala.collection.immutable.List.foreach(List.scala:381)
    	at org.scalatest.SuperEngine.traverseSubNodes$1(Engine.scala:401)
    	at org.scalatest.SuperEngine.org$scalatest$SuperEngine$$runTestsInBranch(Engine.scala:396)
    	at org.scalatest.SuperEngine.runTestsImpl(Engine.scala:483)
    	at org.scalatest.FunSuiteLike$class.runTests(FunSuiteLike.scala:208)
    	at org.scalatest.FunSuite.runTests(FunSuite.scala:1555)
    	at org.scalatest.Suite$class.run(Suite.scala:1424)
    	at org.scalatest.FunSuite.org$scalatest$FunSuiteLike$$super$run(FunSuite.scala:1555)
    	at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
    	at org.scalatest.FunSuiteLike$$anonfun$run$1.apply(FunSuiteLike.scala:212)
    	at org.scalatest.SuperEngine.runImpl(Engine.scala:545)
    	at org.scalatest.FunSuiteLike$class.run(FunSuiteLike.scala:212)
    	at org.apache.spark.SparkFunSuite.org$scalatest$BeforeAndAfterAll$$super$run(SparkFunSuite.scala:28)
    	at org.scalatest.BeforeAndAfterAll$class.liftedTree1$1(BeforeAndAfterAll.scala:257)
    	at org.scalatest.BeforeAndAfterAll$class.run(BeforeAndAfterAll.scala:256)
    	at org.apache.spark.SparkFunSuite.run(SparkFunSuite.scala:28)
    	at org.scalatest.tools.Framework.org$scalatest$tools$Framework$$runSuite(Framework.scala:357)
    	at org.scalatest.tools.Framework$ScalaTestTask.execute(Framework.scala:502)
    	at sbt.ForkMain$Run$2.call(ForkMain.java:296)
    	at sbt.ForkMain$Run$2.call(ForkMain.java:286)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: java.sql.SQLException: Failed to start database 'metastore_db' with class loader org.apache.spark.sql.hive.client.IsolatedClientLoader$$anon$1@25b50060, see the next exception for details.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    	... 122 more
    Caused by: java.sql.SQLException: Another instance of Derby may have already booted the database /Users/yhuai/Projects/Spark/yin-spark-2/sql/hive/metastore_db.
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
    	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
    	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
    	... 119 more
    Caused by: ERROR XSDB6: Another instance of Derby may have already booted the database /Users/yhuai/Projects/Spark/yin-spark-2/sql/hive/metastore_db.
    	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
    	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.privGetJBMSLockOnDB(Unknown Source)
    	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.run(Unknown Source)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.getJBMSLockOnDB(Unknown Source)
    	at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
    	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
    	at org.apache.derby.impl.store.raw.RawStore.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
    	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
    	at org.apache.derby.impl.store.access.RAMAccessManager.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.startModule(Unknown Source)
    	at org.apache.derby.iapi.services.monitor.Monitor.bootServiceModule(Unknown Source)
    	at org.apache.derby.impl.db.BasicDatabase.bootStore(Unknown Source)
    	at org.apache.derby.impl.db.BasicDatabase.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.boot(Unknown Source)
    	at org.apache.derby.impl.services.monitor.TopService.bootModule(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.bootService(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.startProviderService(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.findProviderAndStartService(Unknown Source)
    	at org.apache.derby.impl.services.monitor.BaseMonitor.startPersistentService(Unknown Source)
    	at org.apache.derby.iapi.services.monitor.Monitor.startPersistentService(Unknown Source)
    	... 119 more
    ------
    ```


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198795229
  
    **[Test build #53621 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53621/consoleFull)** for PR 11836 at commit [`4b37d7a`](https://github.com/apache/spark/commit/4b37d7aae3bdaaf61dba18d23dae2c7da9938a5f).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198802396
  
    ahhh that's a lot more failed tests. I'll investigate tonight.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200443150
  
    looks like the conflicts are very easy to resolve.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200080631
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198579522
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199421720
  
    **[Test build #53702 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53702/consoleFull)** for PR 11836 at commit [`52e0273`](https://github.com/apache/spark/commit/52e027367dc03fcdec1aab7792f6e332e16f14a7).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56755492
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -182,13 +189,15 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         client.getTable(db, table)
       }
     
    +  override def tableExists(db: String, table: String): Boolean = withClient {
    +    client.getTableOption(db, table).isDefined
    +  }
    +
       override def listTables(db: String): Seq[String] = withClient {
    -    requireDbExists(db)
    --- End diff --
    
    Which test?


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198584058
  
    **[Test build #53582 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53582/consoleFull)** for PR 11836 at commit [`c439280`](https://github.com/apache/spark/commit/c439280820a3478c45b64de8c605b0cc0f96e1a1).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743828
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -666,6 +470,241 @@ private[hive] object HiveContext {
         defaultValue = Some(true),
         doc = "When set to true, Hive Thrift server executes SQL queries in an asynchronous way.")
     
    +  /**
    +   * The version of the hive client that will be used to communicate with the metastore.  Note that
    +   * this does not necessarily need to be the same version of Hive that is used internally by
    +   * Spark SQL for execution.
    +   */
    +  private def hiveMetastoreVersion(conf: SQLConf): String = {
    +    conf.getConf(HIVE_METASTORE_VERSION)
    +  }
    +
    +  /**
    +   * The location of the jars that should be used to instantiate the HiveMetastoreClient.  This
    +   * property can be one of three options:
    +   *  - a classpath in the standard format for both hive and hadoop.
    +   *  - builtin - attempt to discover the jars that were used to load Spark SQL and use those. This
    +   *              option is only valid when using the execution version of Hive.
    +   *  - maven - download the correct version of hive on demand from maven.
    +   */
    +  private def hiveMetastoreJars(conf: SQLConf): String = {
    +    conf.getConf(HIVE_METASTORE_JARS)
    +  }
    +
    +  /**
    +   * A comma separated list of class prefixes that should be loaded using the classloader that
    +   * is shared between Spark SQL and a specific version of Hive. An example of classes that should
    +   * be shared is JDBC drivers that are needed to talk to the metastore. Other classes that need
    +   * to be shared are those that interact with classes that are already shared.  For example,
    +   * custom appenders that are used by log4j.
    +   */
    +  private def hiveMetastoreSharedPrefixes(conf: SQLConf): Seq[String] = {
    +    conf.getConf(HIVE_METASTORE_SHARED_PREFIXES).filterNot(_ == "")
    +  }
    +
    +  /**
    +   * A comma separated list of class prefixes that should explicitly be reloaded for each version
    +   * of Hive that Spark SQL is communicating with.  For example, Hive UDFs that are declared in a
    +   * prefix that typically would be shared (i.e. org.apache.spark.*)
    +   */
    +  private def hiveMetastoreBarrierPrefixes(conf: SQLConf): Seq[String] = {
    +    conf.getConf(HIVE_METASTORE_BARRIER_PREFIXES).filterNot(_ == "")
    +  }
    +
    +  /**
    +   * Configurations needed to create a [[HiveClient]].
    +   */
    +  private[hive] def hiveClientConfigurations(hiveconf: HiveConf): Map[String, String] = {
    --- End diff --
    
    is the next step to move this into the hive catalog itself?



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56753399
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveContext.scala ---
    @@ -81,15 +83,31 @@ class HiveContext private[hive](
         sc: SparkContext,
         cacheManager: CacheManager,
         listener: SQLListener,
    -    @transient private val execHive: HiveClientImpl,
    -    @transient private val metaHive: HiveClient,
    -    isRootContext: Boolean)
    -  extends SQLContext(sc, cacheManager, listener, isRootContext) with Logging {
    +    @transient protected[hive] val executionHive: HiveClientImpl,
    --- End diff --
    
    IDK what we use it for but it's already there before so I just kept it. @yhuai


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743709
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala ---
    @@ -52,37 +52,34 @@ class InMemoryCatalog extends ExternalCatalog {
         names.filter { funcName => regex.pattern.matcher(funcName).matches() }
       }
     
    -  private def existsFunction(db: String, funcName: String): Boolean = {
    +  private def functionExists(db: String, funcName: String): Boolean = {
         requireDbExists(db)
         catalog(db).functions.contains(funcName)
       }
     
    -  private def existsTable(db: String, table: String): Boolean = {
    -    requireDbExists(db)
    -    catalog(db).tables.contains(table)
    -  }
    -
    -  private def existsPartition(db: String, table: String, spec: TablePartitionSpec): Boolean = {
    +  private def partitionExists(db: String, table: String, spec: TablePartitionSpec): Boolean = {
    --- End diff --
    
    in the future let's separate renames likes this from large prs.



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200186105
  
    **[Test build #53900 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53900/consoleFull)** for PR 11836 at commit [`5ea8469`](https://github.com/apache/spark/commit/5ea8469aafd347a7d1e69077de8d31a8f0167b25).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200533304
  
    Merging in master - thanks!



---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199500449
  
    **[Test build #53702 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53702/consoleFull)** for PR 11836 at commit [`52e0273`](https://github.com/apache/spark/commit/52e027367dc03fcdec1aab7792f6e332e16f14a7).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199964858
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199571501
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200378686
  
    Ah, we also need to update the python test after we changed the behavior of list tables in a non-existent db.


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200562121
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53956/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200465182
  
    **[Test build #53956 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53956/consoleFull)** for PR 11836 at commit [`350bd2e`](https://github.com/apache/spark/commit/350bd2ebc2b44a5e6d3f58325aa9272f13201af6).


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200201547
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53890/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198579523
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53579/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198579500
  
    **[Test build #53579 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53579/consoleFull)** for PR 11836 at commit [`5e16480`](https://github.com/apache/spark/commit/5e1648074ffb96f1b2104dc5ea3d78d25e505181).
     * This patch **fails MiMa tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `class SimpleAnalyzer(conf: CatalystConf)`
      * `class SessionCatalog(externalCatalog: ExternalCatalog, conf: CatalystConf) `


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200249568
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53906/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198628682
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/53585/
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200508253
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-200087113
  
    retest this please


---
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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-198615313
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199444478
  
    **[Test build #53703 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/53703/consoleFull)** for PR 11836 at commit [`19750d7`](https://github.com/apache/spark/commit/19750d74230e1839c0b678be946b79e5afe43261).
     * 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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#issuecomment-199526267
  
    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] Replace existing catalog w...

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

    https://github.com/apache/spark/pull/11836#discussion_r56743800
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveCatalog.scala ---
    @@ -85,6 +85,13 @@ private[spark] class HiveCatalog(client: HiveClient) extends ExternalCatalog wit
         withClient { getTable(db, table) }
       }
     
    +  /**
    +   * Switch our client to one that belongs to the new session.
    +   */
    +  def newSession(newClient: HiveClient): this.type = {
    --- End diff --
    
    i'm not sure about this one, but should we just consider creating the hive client in the ctor itself?



---
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