tanishq-chugh commented on code in PR #6137:
URL: https://github.com/apache/hive/pull/6137#discussion_r2441580036


##########
jdbc/src/java/org/apache/hive/jdbc/Utils.java:
##########
@@ -890,4 +885,18 @@ public static String getPassword(Map<String, String> 
confMap, String key) {
     }
     return password;
   }
+
+  /**
+   * Method to get the default port based on the transport mode.
+   * @param connectionParams JDBC connection parameters
+   * @return defaultPort
+   */
+  public static String getDefaultPort(JdbcConnectionParams connectionParams) {
+    String port = HiveConf.ConfVars.HIVE_SERVER2_THRIFT_PORT.getDefaultValue();
+    String transportMode = 
connectionParams.getSessionVars().get(JdbcConnectionParams.TRANSPORT_MODE);
+    if (transportMode != null && "http".equalsIgnoreCase(transportMode)) {

Review Comment:
   Thanks for catching this @okumin , this was indeed unnecessary & redundant 
check after addressing the checkstyle issue earlier. Made the change in 
[ec8a0da](https://github.com/apache/hive/pull/6137/commits/ec8a0dac57f397a5c03f8a9881bbe568ad079394)



-- 
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.

To unsubscribe, e-mail: [email protected]

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