use of com.facebook.presto.sql.tree.ShowStats in project presto by prestodb.
the class AstBuilder method visitShowStatsForQuery.
@Override
public Node visitShowStatsForQuery(SqlBaseParser.ShowStatsForQueryContext context) {
QuerySpecification specification = (QuerySpecification) visitQuerySpecification(context.querySpecification());
Query query = new Query(Optional.empty(), specification, Optional.empty(), Optional.empty(), Optional.empty());
return new ShowStats(Optional.of(getLocation(context)), new TableSubquery(query));
}
use of com.facebook.presto.sql.tree.ShowStats in project presto by prestodb.
the class TestSqlParser method testShowStats.
@Test
public void testShowStats() {
final String[] tableNames = { "t", "s.t", "c.s.t" };
for (String fullName : tableNames) {
QualifiedName qualifiedName = makeQualifiedName(fullName);
assertStatement(format("SHOW STATS FOR %s", qualifiedName), new ShowStats(new Table(qualifiedName)));
}
}
Aggregations