@Test
public void testBuildDDLQuotedTableName() throws Exception {
Schema schema2 = SchemaBuilder.builder()
.add("name", TajoDataTypes.Type.BLOB)
.add("addr", TajoDataTypes.Type.TEXT)
.add("FirstName", TajoDataTypes.Type.TEXT)
.add("LastName", TajoDataTypes.Type.TEXT)
.add("with", TajoDataTypes.Type.TEXT)
.build();
Schema expressionSchema2 = SchemaBuilder.builder()
.add("BirthYear", TajoDataTypes.Type.INT4)
.build();
PartitionMethodDesc partitionMethod2 = new PartitionMethodDesc(
"db1",
"table1",
CatalogProtos.PartitionType.COLUMN,
"key,key2",
expressionSchema2);
TableDesc desc = new TableDesc("db1.TABLE2", schema2, meta1, new Path("/table1").toUri());
desc.setPartitionMethod(partitionMethod2);
desc.setExternal(true);
assertEquals(JavaResourceUtil.readTextFromResource("results/testDDLBuilder/testBuildDDLQuotedTableName1.result"),
DDLBuilder.buildDDLForExternalTable(desc));
desc = new TableDesc("db1.TABLE1", schema2, meta1, new Path("/table1").toUri());
desc.setPartitionMethod(partitionMethod2);
desc.setExternal(false);
assertEquals(JavaResourceUtil.readTextFromResource("results/testDDLBuilder/testBuildDDLQuotedTableName2.result"),
DDLBuilder.buildDDLForBaseTable(desc));
}