zabetak commented on a change in pull request #1347:
URL: https://github.com/apache/hive/pull/1347#discussion_r467837707



##########
File path: ql/src/java/org/apache/hadoop/hive/ql/session/SessionState.java
##########
@@ -1743,7 +1743,9 @@ public void setLocalMapRedErrors(Map<String, 
List<String>> localMapRedErrors) {
 
   public String getCurrentDatabase() {
     if (currentDatabase == null) {
-      currentDatabase = DEFAULT_DATABASE_NAME;
+      currentDatabase = sessionConf.getVar(ConfVars.HIVE_CURRENT_DATABASE);

Review comment:
       The dockerized metastore dump introduced in this PR has all TPC-DS 
inside `tpcds_bin_partitioned_orc_30000` database (and not in default). The 
existing queries assume that the tables are in the `default` database so 
without further changes they cannot run. 
   
   There are various ways to overcome this but I thought that the most elegant 
was to to exploit the HIVE_CURRENT_DATABASE property since it is already there.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



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

Reply via email to