branch-2.1: [fix](system) fix alter system modify hostname with valid ip exception #49551 (#49561)

cherry pick from #49551
This commit is contained in:
yujun
2025-03-27 19:49:27 +08:00
committed by GitHub
parent 374b901717
commit ed56e84b31

View File

@ -64,8 +64,6 @@ public class ModifyNodeHostNameClause extends AlterClause {
// if no IP address for the host could be found, 'getByName'
// will throw UnknownHostException
InetAddress.getByName(newHost);
} else {
throw new AnalysisException("Invalid hostname: " + newHost);
}
} catch (UnknownHostException e) {
throw new AnalysisException("Unknown hostname: " + e.getMessage());