presto-main/src/main/java/io/prestosql/sql/rewrite/ShowStatsRewrite.java/Visitor/rewriteShowStats
class Visitor:        private Node rewriteShowStats(ShowStats node, Table table, Constraint constraint)
        {
            TableHandle tableHandle = getTableHandle(node, table.getName());
            TableStatistics tableStatistics = metadata.getTableStatistics(session, tableHandle, constraint);
            List<String> statsColumnNames = buildColumnsNames();
            List<SelectItem> selectItems = buildSelectItems(statsColumnNames);
            TableMetadata tableMetadata = metadata.getTableMetadata(session, tableHandle);
            Map<String, ColumnHandle> columnHandles = metadata.getColumnHandles(session, tableHandle);
            List<Expression> resultRows = buildStatisticsRows(tableMetadata, columnHandles, tableStatistics);

            return simpleQuery(selectAll(selectItems),
                    aliased(new Values(resultRows),
                            "table_stats_for_" + table.getName(),
                            statsColumnNames));
        }