use of io.prestosql.sql.tree.ShowStats in project hetu-core by openlookeng.
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 io.prestosql.sql.tree.ShowStats in project hetu-core by openlookeng.
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