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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to