Github user srowen commented on a diff in the pull request: https://github.com/apache/spark/pull/19408#discussion_r142038575 --- Diff: core/src/main/scala/org/apache/spark/util/Utils.scala --- @@ -981,7 +981,13 @@ private[spark] object Utils extends Logging { return cached } - val indx: Int = hostPort.lastIndexOf(':') + val indx: Int = + // Interpret hostPort as literal IPv6 address if it contains two ore more colons + // scalastyle:off SingleSpaceBetweenRParenAndLCurlyBrace + if (hostPort.matches("(([0-9a-f]*):([0-9a-f]*)){2,}")) -1 + // Else last colon defines start of port definition + else hostPort.lastIndexOf(':') --- End diff -- Final nit, use braces for both parts of the if-else
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org