Source:
public final void testCreateColumnPartitionedTable() throws Exception { ResultSet res = null; String tableName = CatalogUtil.normalizeIdentifier("testCreateColumnPartitionedTable"); if (nodeType == NodeType.INSERT) { res = executeString( "create table " + tableName + " (col1 int4, col2 int4) partition by column(key float8) "); res.close(); assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName)); assertEquals(2, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getSchema().size()); assertEquals(3, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getLogicalSchema().size()); res = testBase.execute( "insert overwrite into " + tableName + " select l_orderkey, l_partkey, " + "l_quantity from lineitem"); } else { res = testBase.execute( "create table " + tableName + "(col1 int4, col2 int4) partition by column(key float8) " + " as select l_orderkey, l_partkey, l_quantity from lineitem"); assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName)); assertEquals(2, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getSchema().size()); assertEquals(3, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getLogicalSchema().size()); } MasterPlan plan = getQueryPlan(res); ExecutionBlock rootEB = plan.getRoot(); assertEquals(1, plan.getChildCount(rootEB.getId())); ExecutionBlock insertEB = plan.getChild(rootEB.getId(), 0); assertNotNull(insertEB); assertEquals(nodeType, insertEB.getPlan().getType()); assertEquals(1, plan.getChildCount(insertEB.getId())); ExecutionBlock scanEB = plan.getChild(insertEB.getId(), 0); List<DataChannel> list = plan.getOutgoingChannels(scanEB.getId()); assertEquals(1, list.size()); DataChannel channel = list.get(0); assertNotNull(channel); assertEquals(SCATTERED_HASH_SHUFFLE, channel.getShuffleType()); assertEquals(1, channel.getShuffleKeys().length); executeString("DROP TABLE " + tableName + " PURGE").close(); res.close(); }

Target:
public final void testCreateColumnPartitionedTable() throws Exception { ResultSet res = null; String tableName = CatalogUtil.normalizeIdentifier("testCreateColumnPartitionedTable"); if (nodeType == NodeType.INSERT) { res = executeString( "create table " + tableName + " (col1 int4, col2 int4) partition by column(key float8) "); res.close(); assertTrue(catalog.existsTable(DEFAULT_DATABASE_NAME, tableName)); assertEquals(2, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getSchema().size()); assertEquals(3, catalog.getTableDesc(DEFAULT_DATABASE_NAME, tableName).getLogicalSchema().size()); res = testBase.execute( "insert overwrite into " + tableName + " select l_orderkey, l_partkey, " + "l_quantity from lineitem"); } else { res = testBase.execute( "create table " + tableName + "(col1 int4, col2 int4) partition by column(key float8) " + " as select l_orderkey, l_partkey, l_quantity from lineitem"); } MasterPlan plan = getQueryPlan(res); ExecutionBlock rootEB = plan.getRoot(); assertEquals(1, plan.getChildCount(rootEB.getId())); ExecutionBlock insertEB = plan.getChild(rootEB.getId(), 0); assertNotNull(insertEB); assertEquals(nodeType, insertEB.getPlan().getType()); assertEquals(1, plan.getChildCount(insertEB.getId())); ExecutionBlock scanEB = plan.getChild(insertEB.getId(), 0); List<DataChannel> list = plan.getOutgoingChannels(scanEB.getId()); assertEquals(1, list.size()); DataChannel channel = list.get(0); assertNotNull(channel); assertEquals(SCATTERED_HASH_SHUFFLE, channel.getShuffleType()); assertEquals(1, channel.getShuffleKeys().length); executeString("DROP TABLE " + tableName + " PURGE").close(); res.close(); }