ResultSet res = tpch.execute("create table " + tableName + " (col1 int8, col2 int4, col3 float4)");
res.close();
TajoTestingCluster cluster = tpch.getTestingCluster();
CatalogService catalog = cluster.getMaster().getCatalog();
assertTrue(catalog.existsTable(tableName));
TableDesc originalDesc = catalog.getTableDesc(tableName);
res = tpch.execute("insert overwrite into " + tableName
+ " (col1, col3) select l_orderkey, l_quantity from lineitem");
res.close();
TableDesc desc = catalog.getTableDesc(tableName);
assertEquals(5, desc.getMeta().getStat().getNumRows().intValue());
res = tpch.execute("select * from " + tableName);
assertTrue(res.next());
assertEquals(1, res.getLong(1));
assertTrue(0f == res.getFloat(2));
assertTrue(res.wasNull());
assertTrue(17.0 == res.getFloat(3));
assertTrue(res.next());
assertEquals(1, res.getLong(1));
assertTrue(0f == res.getFloat(2));
assertTrue(res.wasNull());
assertTrue(36.0 == res.getFloat(3));
assertTrue(res.next());
assertEquals(2, res.getLong(1));
assertTrue(0f == res.getFloat(2));
assertTrue(res.wasNull());
assertTrue(38.0 == res.getFloat(3));
assertTrue(res.next());
assertTrue(0f == res.getFloat(2));
assertTrue(res.wasNull());
assertTrue(45.0 == res.getFloat(3));
assertTrue(res.next());
assertEquals(3, res.getLong(1));
assertTrue(0f == res.getFloat(2));
assertTrue(res.wasNull());
assertTrue(49.0 == res.getFloat(3));
assertFalse(res.next());
res.close();
assertEquals(originalDesc.getMeta().getSchema(), desc.getMeta().getSchema());
}