You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2020/07/09 14:55:39 UTC

[GitHub] [hive] belugabehr commented on a change in pull request #1143: HIVE-23717: In jdbcUrl add config to create external purge table by d…

belugabehr commented on a change in pull request #1143:
URL: https://github.com/apache/hive/pull/1143#discussion_r452279903



##########
File path: jdbc/src/java/org/apache/hive/jdbc/HiveConnection.java
##########
@@ -844,11 +844,18 @@ private void openSession() throws SQLException {
     }
 
     // set the session configuration
-    Map<String, String> sessVars = connParams.getSessionVars();
-    if (sessVars.containsKey(HiveAuthConstants.HS2_PROXY_USER)) {
+    if (sessConfMap.containsKey(HiveAuthConstants.HS2_PROXY_USER)) {
       openConf.put(HiveAuthConstants.HS2_PROXY_USER,
-          sessVars.get(HiveAuthConstants.HS2_PROXY_USER));
+          sessConfMap.get(HiveAuthConstants.HS2_PROXY_USER));
     }
+
+    // set create external purge table by default
+    if (sessConfMap.containsKey(JdbcConnectionParams.DEFAULT_EXTERNAL_TABLE) &&
+        sessConfMap.get(JdbcConnectionParams.DEFAULT_EXTERNAL_TABLE).toLowerCase().equals("true")) {

Review comment:
       nit: I prefer `Boolean.parseBoolean()` here
   
   https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html#parseBoolean-java.lang.String-




----------------------------------------------------------------
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:
users@infra.apache.org



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