final SelectOperator selectionPart = new SelectOperator(new LikePredicate(
new ColumnReference(_sc, 1), new ValueSpecification(_sc, COLOR)));
final ProjectOperator projectionPart = new ProjectOperator(new int[] { 0 });
final DataSourceComponent relationPart = new DataSourceComponent("PART", dataPath + "part"
+ extension, _queryPlan).setHashIndexes(hashPart).addOperator(selectionPart)
.addOperator(projectionPart);
// -------------------------------------------------------------------------------------
final List<Integer> hashLineitem = Arrays.asList(1);
final ProjectOperator projectionLineitem = new ProjectOperator(
new int[] { 0, 1, 2, 4, 5, 6 });
final DataSourceComponent relationLineitem = new DataSourceComponent("LINEITEM", dataPath
+ "lineitem" + extension, _queryPlan).setHashIndexes(hashLineitem).addOperator(
projectionLineitem);
// -------------------------------------------------------------------------------------
final EquiJoinComponent P_Ljoin = new EquiJoinComponent(relationPart, relationLineitem,
_queryPlan).setHashIndexes(Arrays.asList(0, 2));
// -------------------------------------------------------------------------------------
final List<Integer> hashPartsupp = Arrays.asList(0, 1);
final ProjectOperator projectionPartsupp = new ProjectOperator(new int[] { 0, 1, 3 });
final DataSourceComponent relationPartsupp = new DataSourceComponent("PARTSUPP", dataPath
+ "partsupp" + extension, _queryPlan).setHashIndexes(hashPartsupp).addOperator(
projectionPartsupp);
// -------------------------------------------------------------------------------------
final EquiJoinComponent P_L_PSjoin = new EquiJoinComponent(P_Ljoin, relationPartsupp,
_queryPlan).setHashIndexes(Arrays.asList(0)).addOperator(
new ProjectOperator(new int[] { 1, 2, 3, 4, 5, 6 }));
// -------------------------------------------------------------------------------------
final List<Integer> hashOrders = Arrays.asList(0);
final ProjectOperator projectionOrders = new ProjectOperator(new ColumnReference(_sc, 0),
new IntegerYearFromDate(new ColumnReference(_dateConv, 4)));
final DataSourceComponent relationOrders = new DataSourceComponent("ORDERS", dataPath
+ "orders" + extension, _queryPlan).setHashIndexes(hashOrders).addOperator(
projectionOrders);
// -------------------------------------------------------------------------------------
final EquiJoinComponent P_L_PS_Ojoin = new EquiJoinComponent(P_L_PSjoin, relationOrders,
_queryPlan).setHashIndexes(Arrays.asList(0)).addOperator(
new ProjectOperator(new int[] { 1, 2, 3, 4, 5, 6 }));
// -------------------------------------------------------------------------------------
final List<Integer> hashSupplier = Arrays.asList(0);
final ProjectOperator projectionSupplier = new ProjectOperator(new int[] { 0, 3 });
final DataSourceComponent relationSupplier = new DataSourceComponent("SUPPLIER", dataPath
+ "supplier" + extension, _queryPlan).setHashIndexes(hashSupplier).addOperator(
projectionSupplier);
// -------------------------------------------------------------------------------------
final EquiJoinComponent P_L_PS_O_Sjoin = new EquiJoinComponent(P_L_PS_Ojoin,
relationSupplier, _queryPlan).setHashIndexes(Arrays.asList(5)).addOperator(
new ProjectOperator(new int[] { 1, 2, 3, 4, 5, 6 }));
// -------------------------------------------------------------------------------------
final List<Integer> hashNation = Arrays.asList(0);
final ProjectOperator projectionNation = new ProjectOperator(new int[] { 0, 1 });
final DataSourceComponent relationNation = new DataSourceComponent("NATION", dataPath
+ "nation" + extension, _queryPlan).setHashIndexes(hashNation).addOperator(
projectionNation);
// -------------------------------------------------------------------------------------
// set up aggregation function on the StormComponent(Bolt) where join is