nrg4878 commented on a change in pull request #2037:
URL: https://github.com/apache/hive/pull/2037#discussion_r602299886



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/ddl/database/desc/DescDatabaseOperation.java
##########
@@ -52,14 +53,22 @@ public int execute() throws HiveException {
         params = new TreeMap<>(database.getParameters());
       }
 
-      String location = database.getLocationUri();
-      if (HiveConf.getBoolVar(context.getConf(), 
HiveConf.ConfVars.HIVE_IN_TEST)) {
-        location = "location/in/test";
-      }
-
+      String location = "";
       DescDatabaseFormatter formatter = 
DescDatabaseFormatter.getFormatter(context.getConf());
-      formatter.showDatabaseDescription(outStream, database.getName(), 
database.getDescription(), location,
-          database.getManagedLocationUri(), database.getOwnerName(), 
database.getOwnerType(), params);
+      if (database.getType() == DatabaseType.NATIVE) {
+        location = database.getLocationUri();
+        if (HiveConf.getBoolVar(context.getConf(), 
HiveConf.ConfVars.HIVE_IN_TEST)) {
+          location = "location/in/test";
+        }
+        // database.setRemote_dbname("");
+        // database.setConnector_name("");
+
+        formatter.showDatabaseDescription(outStream, database.getName(), 
database.getDescription(), location,
+          database.getManagedLocationUri(), database.getOwnerName(), 
database.getOwnerType(), params, "", "");
+      } else {

Review comment:
       Changed to switch/case construct.




-- 
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to