You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2018/04/21 17:42:39 UTC

[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

GitHub user gatorsmile opened a pull request:

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

    [SPARK-24017] [SQL] Refactor ExternalCatalog to be an interface

    ## What changes were proposed in this pull request?
    This refactors the external catalog to be an interface. It can be easier for the future work in the catalog federation. After the refactoring, `ExternalCatalog` is much cleaner without mixing the listener event generation logic.  
    
    ## How was this patch tested?
    The existing tests

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

    $ git pull https://github.com/gatorsmile/spark refactorExternalCatalog

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

    https://github.com/apache/spark/pull/21122.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 #21122
    
----
commit c62bba1ed024c7d1d91da8f3d8035de8dc169302
Author: gatorsmile <ga...@...>
Date:   2018-04-21T17:36:20Z

    fix

----


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    retest this please


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186256056
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    Ideally Hive should not be a first-class citizen in Spark, it's just a data source and a catalog, and nothing more. We want to narrow down the scope of hive usage in Spark, and keeping it only in `HiveExternalCatalog` is a good choice.
    
    This is still an on-going effort, as @rdblue pointed out, there are still 2 places Spark uses Hive directly:
    1. `HiveSessionStateBuilder`. It's mostly for the ADD JAR, once we move the ADD JAR functionality to `ExternalCatalog`, we can fix it
    2. `SaveAsHiveFile`. It's the data source part so it should be allowed to use Hive there. One thing we can improve is the hive client reuse. We cast `HiveExternalCatalog` to get the existing hive client, maybe there is a better way to do it without the ugly casting.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

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


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186452677
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    @gatorsmile, I agree that we don't need to block this PR on the problem, but could you create or post the issues that track solving these problems?


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186132760
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    The hive client is just for HiveExternalCatalog. It is meaningless for the other external catalogs. 


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r183268517
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
       import CatalogTypes.TablePartitionSpec
     
    +  // Returns the underlying catalog class (e.g., HiveExternalCatalog).
    +  def unwrapped: ExternalCatalog = this
    --- End diff --
    
    @gatorsmile . We had better skip the default implementation here. How do you think about that?


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

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


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186214427
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    The client is used for interacting with Hive metastore. Conceptually, it should be part of `HiveExternalCatalog`. If we want to pass it as a field of HiveExternalCatalog , we need to create the client in SharedState, which is in the core module instead of the hive module. Since we are getting rid of Hive from the code base, we do not want a Hive-speicific SharedState. Any better idea?


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r183270323
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
       import CatalogTypes.TablePartitionSpec
     
    +  // Returns the underlying catalog class (e.g., HiveExternalCatalog).
    +  def unwrapped: ExternalCatalog = this
    --- End diff --
    
    Maybe we can move it to `ExternalCatalogWithListener` and mark `SharedState.externalCatalog` as `ExternalCatalogWithListener`


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2562/
    Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #90218 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90218/testReport)** for PR 21122 at commit [`9d97ebf`](https://github.com/apache/spark/commit/9d97ebf34351acf53a9be5bfa286005f5ee9cb0c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #89681 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89681/testReport)** for PR 21122 at commit [`c62bba1`](https://github.com/apache/spark/commit/c62bba1ed024c7d1d91da8f3d8035de8dc169302).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait ExternalCatalog `
      * `  // Returns the underlying catalog class (e.g., HiveExternalCatalog).`
      * `class ExternalCatalogWithListener(delegate: ExternalCatalog)`


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r183269033
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
    --- End diff --
    
    Based on your JIRA comment, can we put `@DeveloperApi` or `@InterfaceStability.Unstable` in this PR?


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

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


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r185138677
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
       import CatalogTypes.TablePartitionSpec
     
    +  // Returns the underlying catalog class (e.g., HiveExternalCatalog).
    +  def unwrapped: ExternalCatalog = this
    --- End diff --
    
    Is there a better way to pass the Hive client? It looks like the uses of `unwrapped` actually just get the Hive client from the HiveExternalCatalog. If we can pass that through, it would prevent the need for this. I think that would be cleaner, unless there is a problem with that I'm missing.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r184228752
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
    --- End diff --
    
    I see. Thank you for confirming, @gatorsmile .


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

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


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186152832
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    There are several places that access the `client`, like `HiveSessionStateBuilder` and `SaveAsHiveFile`. My point is that assuming the catalog is a `HiveExternalCatalog`, casting, and accessing a field of the catalog to get the client isn't a good way to pass the client to where it is needed. Why doesn't this code pass both `client` and `catalog` to these classes to avoid this problem?
    
    I don't think it matters that Hive may be removed in the future. Unless removing it is going to happen in a week or two, I'm skeptical that it is going to be soon enough that we should ignore problems with the implementation.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    LGTM


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #90184 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90184/testReport)** for PR 21122 at commit [`b24071f`](https://github.com/apache/spark/commit/b24071f6e6ad93aac49a08217f269999ba8ad644).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186138866
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    @gatorsmile, the problem is that Hive classes access the Hive client from the HiveExternalCatalog in several places. Why is it getting the client this way? Shouldn't that client get passed separately?


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186205362
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    @gatorsmile, what is the reason for passing the client as a field of HiveExternalCatalog and not on its own? This requires casting the catalog to access the client, and there doesn't appear to be an obvious reason not to pass the client separately.
    
    Given that this is a problem -- the proposed interface was returning a wrapped catalog -- I'm trying to understand why it is this way and whether it should be changed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #89680 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89680/testReport)** for PR 21122 at commit [`c62bba1`](https://github.com/apache/spark/commit/c62bba1ed024c7d1d91da8f3d8035de8dc169302).
     * This patch **fails PySpark unit tests**.
     * This patch merges cleanly.
     * This patch adds the following public classes _(experimental)_:
      * `trait ExternalCatalog `
      * `  // Returns the underlying catalog class (e.g., HiveExternalCatalog).`
      * `class ExternalCatalogWithListener(delegate: ExternalCatalog)`


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test FAILed.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r184206565
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
    --- End diff --
    
    This trait is still an internal one. We have not make it public yet. 


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #90184 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90184/testReport)** for PR 21122 at commit [`b24071f`](https://github.com/apache/spark/commit/b24071f6e6ad93aac49a08217f269999ba8ad644).


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186202212
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    In the 2.0 release, we did a lot of work to refactor the previous Hive integration and move the client to HiveExternalCatalog. This is still the ongoing work. If you have time, please help this effort too! 


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r185967201
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
       import CatalogTypes.TablePartitionSpec
     
    +  // Returns the underlying catalog class (e.g., HiveExternalCatalog).
    +  def unwrapped: ExternalCatalog = this
    --- End diff --
    
    Sure, let us get rid of it from this interface. We can do it in ExternalCatalogWithListener.scala


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2901/
    Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2927/
    Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2561/
    Test FAILed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

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


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186321180
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    The issue is out of scope this PR. We can continue addressing the related issues in the future PRs.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186053360
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    maybe we should define a util method to get hive client from `SparkSession`


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    Thanks! Merged to master


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #89681 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89681/testReport)** for PR 21122 at commit [`c62bba1`](https://github.com/apache/spark/commit/c62bba1ed024c7d1d91da8f3d8035de8dc169302).


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #90218 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/90218/testReport)** for PR 21122 at commit [`9d97ebf`](https://github.com/apache/spark/commit/9d97ebf34351acf53a9be5bfa286005f5ee9cb0c).


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186119360
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    Why are we passing the client using the catalog in the first place? Is this convenience, or is there a reason why we can't pass both separately? I don't think we should be doing this without a reason. I don't like needless casts.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186142381
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/InMemoryCatalog.scala ---
    @@ -199,8 +199,8 @@ class InMemoryCatalog(
           // to create the table directory and write out data before we create this table, to avoid
           // exposing a partial written table.
           val needDefaultTableLocation =
    -        tableDefinition.tableType == CatalogTableType.MANAGED &&
    -          tableDefinition.storage.locationUri.isEmpty
    +      tableDefinition.tableType == CatalogTableType.MANAGED &&
    +        tableDefinition.storage.locationUri.isEmpty
    --- End diff --
    
    nit. Maybe, this spacing change is not your intention.


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r184475841
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/ExternalCatalog.scala ---
    @@ -31,10 +30,16 @@ import org.apache.spark.util.ListenerBus
      *
      * Implementations should throw [[NoSuchDatabaseException]] when databases don't exist.
      */
    -abstract class ExternalCatalog
    -  extends ListenerBus[ExternalCatalogEventListener, ExternalCatalogEvent] {
    +trait ExternalCatalog {
    --- End diff --
    
    Hopefully, the next release. 


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186243450
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    We plan to get rid of `HiveSessionStateBuilder` and treat `Hive` tables as the regular data source tables. `Hive` should be the same as the other external data sources. For the other data sources, we will not have a shared state and session state. Hive metastore is just used for global metastore. In the future, it is also pluggable. Thus, it does not make sense to re-introduce Hive SharedState in the current stage. 


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by henryr <gi...@git.apache.org>.
Github user henryr commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    cc @rdblue 


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186143143
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    We want to get rid of Hive dependency completely in the near future. Currently, in the source code, only HiveExternalCatalog needs to use/access the `client`. 
    
    I might not get your point. Could you explain how to pass the client when we keep the client in `HiveExternalCatalog`?


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

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

    https://github.com/apache/spark/pull/21122
  
    **[Test build #89680 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89680/testReport)** for PR 21122 at commit [`c62bba1`](https://github.com/apache/spark/commit/c62bba1ed024c7d1d91da8f3d8035de8dc169302).


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by cloud-fan <gi...@git.apache.org>.
Github user cloud-fan commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    To add some more color, the current `ExternalCatalog` is an abstract class and can already be implemented outside of Spark. However the problem is the listeners. Everytime we want to listen to one more event, we need to break the API(`createDatabase` and `doCreateDatabase`). this is very bad for a stable interface.
    
    The main goal of this PR is to pull out the listener stuff from `ExternalCatalog`, and make `ExternalCatalog` a pure interface.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by dongjoon-hyun <gi...@git.apache.org>.
Github user dongjoon-hyun commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    +1, LGTM, too. Thank you for choosing this path, @gatorsmile !


---

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


[GitHub] spark pull request #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to b...

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

    https://github.com/apache/spark/pull/21122#discussion_r186240975
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1354,7 +1354,8 @@ class HiveDDLSuite
         val indexName = tabName + "_index"
         withTable(tabName) {
           // Spark SQL does not support creating index. Thus, we have to use Hive client.
    -      val client = spark.sharedState.externalCatalog.asInstanceOf[HiveExternalCatalog].client
    +      val client =
    +        spark.sharedState.externalCatalog.unwrapped.asInstanceOf[HiveExternalCatalog].client
    --- End diff --
    
    > Conceptually, it should be part of HiveExternalCatalog.
    
    Why? If this is true, then why is it used outside of the catalog?
    
    As far as a Hive-specific shared state, that sounds like the "right" way to do this. As long as this doesn't leak into the API, it isn't a big problem. But, practices like this that require breaking abstractions by casting to a known concrete class just to avoid passing multiple variables makes Spark more brittle. It is great to hear we want to eliminate Hive, but that doesn't mean the Hive code shouldn't be properly maintained while it is still supported.


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    cc @rxin @cloud-fan 


---

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


[GitHub] spark issue #21122: [SPARK-24017] [SQL] Refactor ExternalCatalog to be an in...

Posted by rdblue <gi...@git.apache.org>.
Github user rdblue commented on the issue:

    https://github.com/apache/spark/pull/21122
  
    Thanks for pointing this out, @henryr. This looks like a good change to support multiple catalogs.
    
    I think it looks fine, other than exposing `unwrapped` to get the Hive client. I think we're probably abusing that instead of passing the client so I think it makes sense to pass the client correctly instead of using `unwrapped`.


---

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