new IntTupleDataInFormat(), this.nationInputPath, "\"nation\" source");
//nationInput.setOutputContract(UniqueKey.class);
// nationInput.getCompilerHints().setAvgNumValuesPerKey(1);
/* Filter on part's name, project values to NULL: */
MapOperator filterPart = MapOperator.builder(PartFilter.class)
.name("filterParts")
.build();
/* Map to change the key element of partsupp, project value to (supplycost, suppkey): */
MapOperator mapPartsupp = MapOperator.builder(PartsuppMap.class)
.name("mapPartsupp")
.build();
/* Map to extract the year from order: */
MapOperator mapOrder = MapOperator.builder(OrderMap.class)
.name("mapOrder")
.build();
/* Project value to (partkey, suppkey, quantity, price = extendedprice*(1-discount)): */
MapOperator mapLineItem = MapOperator.builder(LineItemMap.class)
.name("proj.Partsupp")
.build();
/* - change the key of supplier to nationkey, project value to suppkey */
MapOperator mapSupplier = MapOperator.builder(SupplierMap.class)
.name("proj.Partsupp")
.build();
/* Equijoin on partkey of part and partsupp: */
JoinOperator partsJoin = JoinOperator.builder(PartJoin.class, IntValue.class, 0, 0)
.name("partsJoin")
.build();
/* Equijoin on orderkey of orders and lineitem: */
JoinOperator orderedPartsJoin =
JoinOperator.builder(OrderedPartsJoin.class, IntValue.class, 0, 0)
.name("orderedPartsJoin")
.build();
/* Equijoin on nationkey of supplier and nation: */
JoinOperator suppliersJoin =
JoinOperator.builder(SuppliersJoin.class, IntValue.class, 0, 0)
.name("suppliersJoin")
.build();
/* Equijoin on (partkey,suppkey) of parts and orderedParts: */
JoinOperator filteredPartsJoin =
JoinOperator.builder(FilteredPartsJoin.class, IntPair.class, 0, 0)
.name("filteredPartsJoin")
.build();
/* Equijoin on suppkey of filteredParts and suppliers: */
JoinOperator partListJoin =
JoinOperator.builder(PartListJoin.class, IntValue.class , 0, 0)
.name("partlistJoin")
.build();
/* Aggregate sum(amount) by (nation,year): */
ReduceOperator sumAmountAggregate =
ReduceOperator.builder(AmountAggregate.class, StringIntPair.class, 0)
.name("groupyBy")
.build();
/* Connect input filters: */
filterPart.setInput(partInput);
mapPartsupp.setInput(partSuppInput);
mapOrder.setInput(ordersInput);
mapLineItem.setInput(lineItemInput);
mapSupplier.setInput(supplierInput);
/* Connect equijoins: */
partsJoin.setFirstInput(filterPart);
partsJoin.setSecondInput(mapPartsupp);
orderedPartsJoin.setFirstInput(mapOrder);