presto-main/src/main/java/io/prestosql/operator/scalar/UrlFunctions.java/UrlFunctions/urlExtractPort
class UrlFunctions:    @SqlNullable
    @Description("extract port from url")
    @ScalarFunction
    @LiteralParameters("x")
    @SqlType(StandardTypes.BIGINT)
    public static Long urlExtractPort(@SqlType("varchar(x)") Slice url)
    {
        URI uri = parseUrl(url);
        if ((uri == null) || (uri.getPort() < 0)) {
            return null;
        }
        return (long) uri.getPort();
    }