use of io.confluent.ksql.parser.tree.DescribeTables in project ksql by confluentinc.
the class KsqlParserTest method testDescribeTablesExtended.
@Test
public void testDescribeTablesExtended() {
final String statementString = "DESCRIBE TABLES EXTENDED;";
final Statement statement = KsqlParserTestUtil.buildSingleAst(statementString, metaStore).getStatement();
assertThat(statement, instanceOf(DescribeTables.class));
final DescribeTables describeTables = (DescribeTables) statement;
assertThat(describeTables.getShowExtended(), is(true));
}
use of io.confluent.ksql.parser.tree.DescribeTables in project ksql by confluentinc.
the class SqlFormatterTest method shouldFormatDescribeTables.
@Test
public void shouldFormatDescribeTables() {
// Given:
final DescribeTables describeTables = new DescribeTables(Optional.empty(), false);
// When:
final String formatted = SqlFormatter.formatSql(describeTables);
// Then:
assertThat(formatted, is("DESCRIBE TABLES"));
}
use of io.confluent.ksql.parser.tree.DescribeTables in project ksql by confluentinc.
the class ListSourceExecutor method describeTables.
public static StatementExecutorResponse describeTables(final ConfiguredStatement<DescribeTables> statement, final SessionProperties sessionProperties, final KsqlExecutionContext executionContext, final ServiceContext serviceContext) {
final List<KsqlTable<?>> ksqlTables = getSpecificTables(executionContext);
final DescribeTables describeTables = statement.getStatement();
return StatementExecutorResponse.handled(sourceDescriptionList(statement, sessionProperties, executionContext, serviceContext, ksqlTables, describeTables.getShowExtended()));
}
use of io.confluent.ksql.parser.tree.DescribeTables in project ksql by confluentinc.
the class KsqlParserTest method testDescribeTables.
@Test
public void testDescribeTables() {
final String statementString = "DESCRIBE TABLES;";
final Statement statement = KsqlParserTestUtil.buildSingleAst(statementString, metaStore).getStatement();
assertThat(statement, instanceOf(DescribeTables.class));
final DescribeTables describeTables = (DescribeTables) statement;
assertThat(describeTables.getShowExtended(), is(false));
}
Aggregations