use of org.apache.drill.exec.proto.UserProtos.GetTablesResp in project drill by apache.
the class TestMetadataProvider method tablesWithSystemTableFilter.
@Test
public void tablesWithSystemTableFilter() throws Exception {
// test("SELECT * FROM INFORMATION_SCHEMA.`TABLES` WHERE TABLE_TYPE IN ('SYSTEM_TABLE')"); // SQL equivalent
GetTablesResp resp = client.getTables(null, null, null, Arrays.asList("SYSTEM_TABLE")).get();
assertEquals(RequestStatus.OK, resp.getStatus());
List<TableMetadata> tables = resp.getTablesList();
assertEquals(11, tables.size());
verifyTable("INFORMATION_SCHEMA", "CATALOGS", tables);
verifyTable("INFORMATION_SCHEMA", "COLUMNS", tables);
verifyTable("INFORMATION_SCHEMA", "SCHEMATA", tables);
verifyTable("INFORMATION_SCHEMA", "TABLES", tables);
verifyTable("INFORMATION_SCHEMA", "VIEWS", tables);
verifyTable("sys", "boot", tables);
verifyTable("sys", "drillbits", tables);
verifyTable("sys", "memory", tables);
verifyTable("sys", "options", tables);
verifyTable("sys", "threads", tables);
verifyTable("sys", "version", tables);
}
Aggregations