ResultSet res = executeQuery();
res.close();
String tableName = CatalogUtil.normalizeIdentifier("testCtasWithColumnedPartition");
TajoTestingCluster cluster = testBase.getTestingCluster();
CatalogService catalog = cluster.getMaster().getCatalog();
TableDesc desc = catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName);
assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName));
PartitionMethodDesc partitionDesc = desc.getPartitionMethod();
assertEquals(partitionDesc.getPartitionType(), CatalogProtos.PartitionType.COLUMN);
assertEquals("key", partitionDesc.getExpressionSchema().getColumns().get(0).getSimpleName());
FileSystem fs = FileSystem.get(cluster.getConfiguration());
Path path = desc.getPath();
assertTrue(fs.isDirectory(path));
assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=17.0")));
assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=36.0")));
assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=38.0")));
assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=45.0")));
assertTrue(fs.isDirectory(new Path(path.toUri() + "/key=49.0")));
if (!cluster.isHCatalogStoreRunning()) {
assertEquals(5, desc.getStats().getNumRows().intValue());
}
ResultSet res2 = executeFile("check2.sql");