Github user dongjoon-hyun commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20564#discussion_r167380287
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala ---
    @@ -1107,11 +1107,6 @@ private[spark] class HiveExternalCatalog(conf: 
SparkConf, hadoopConf: Configurat
           }
         }
     
    -    // Note: Before altering table partitions in Hive, you *must* set the 
current database
    -    // to the one that contains the table of interest. Otherwise you will 
end up with the
    -    // most helpful error message ever: "Unable to alter partition. alter 
is not possible."
    -    // See HIVE-2742 for more detail.
    -    client.setCurrentDatabase(db)
    --- End diff --
    
    Can we have a test case for the exception?
    > This removes the exception that some calls from HiveExternalCatalog can 
reset the current database in the hive client as a side effect.


---

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

Reply via email to