Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ public static void main(String[] args) throws Exception {

// get input data
DataSet<Lineitem> lineitems = getLineitemDataSet(env, params.get("lineitem"));
DataSet<Order> orders = getOrdersDataSet(env, params.get("customer"));
DataSet<Customer> customers = getCustomerDataSet(env, params.get("orders"));
DataSet<Customer> customers = getCustomerDataSet(env, params.get("customer"));
DataSet<Order> orders = getOrdersDataSet(env, params.get("orders"));

// Filter market segment "AUTOMOBILE"
customers = customers.filter(
Expand Down Expand Up @@ -180,7 +180,10 @@ public ShippingPriorityItem join(ShippingPriorityItem i, Lineitem l) {
// DATA TYPES
// *************************************************************************

private static class Lineitem extends Tuple4<Long, Double, Double, String> {
/**
* Lineitem.
*/
public static class Lineitem extends Tuple4<Long, Double, Double, String> {

public Long getOrderkey() {
return this.f0;
Expand All @@ -199,7 +202,10 @@ public String getShipdate() {
}
}

private static class Customer extends Tuple2<Long, String> {
/**
* Customer.
*/
public static class Customer extends Tuple2<Long, String> {

public Long getCustKey() {
return this.f0;
Expand All @@ -210,7 +216,10 @@ public String getMktsegment() {
}
}

private static class Order extends Tuple4<Long, Long, String, Long> {
/**
* Order.
*/
public static class Order extends Tuple4<Long, Long, String, Long> {

public Long getOrderKey() {
return this.f0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ object TPCHQuery3 {
getCustomerDataSet(env, params.get("customer")).
filter( c => c.mktSegment.equals("AUTOMOBILE"))
// read orders
val orders = getOrdersDataSet(env, params.get("order"))
val orders = getOrdersDataSet(env, params.get("orders"))

// filter orders by order date
val items = orders.filter( o => dateFormat.parse(o.orderDate).before(date) )
Expand Down