presto-jmx/src/main/java/io/prestosql/plugin/jmx/JmxMetadata.java/JmxMetadata/toPattern
class JmxMetadata:    public static String toPattern(String tableName)
    {
        try {
            if (!tableName.contains("*")) {
                return Pattern.quote(new ObjectName(tableName).getCanonicalName());
            }
            return Streams.stream(Splitter.on('*').split(tableName))
                    .map(Pattern::quote)
                    .collect(Collectors.joining(".*"));
        }
        catch (MalformedObjectNameException exception) {
            LOGGER.debug(exception, "Invalid ObjectName");
            throw new PrestoException(JMX_INVALID_TABLE_NAME, "Not a valid ObjectName " + tableName);
        }
    }