rtrivedi12 commented on code in PR #4704: URL: https://github.com/apache/hive/pull/4704#discussion_r1357437740
########## service/src/java/org/apache/hive/service/cli/thrift/RetryingThriftCLIServiceClient.java: ########## @@ -310,8 +310,8 @@ protected synchronized TTransport connect(HiveConf conf) throws HiveSQLException String host = conf.getVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_BIND_HOST); int port = conf.getIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_PORT); - int maxThriftMessageSize = (int) conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE); - LOG.info("Connecting to " + host + ":" + port); + int maxThriftMessageSize = (int) Math.min(conf.getSizeVar(HiveConf.ConfVars.HIVE_THRIFT_CLIENT_MAX_MESSAGE_SIZE),Integer.MAX_VALUE); Review Comment: Agreed.. `Math.min()` is not needed here. SizeValidator enforces the check. Incorporated the change! -- 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: gitbox-unsubscr...@hive.apache.org 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