Skip to content

Commit

Permalink
Fixed some bugs in the query plans. All but one java query plans works.
Browse files Browse the repository at this point in the history
  • Loading branch information
avitorovic committed Apr 7, 2015
1 parent 803aa77 commit 31504cd
Show file tree
Hide file tree
Showing 29 changed files with 37 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,7 @@ test/data/tpch/50G
test/results/tpch/10G
test/results/tpch/50G

contrib-eclipse-missing

# sbt
target/
2 changes: 1 addition & 1 deletion bin/regressive_test.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
./recompile.sh
#./recompile.sh
rm /tmp/tmp*

# Check command line of command line arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
import java.util.Map;

import ch.epfl.data.squall.components.Component;


/*
* QueryPlan is for new imperative interface (such as HyracksPlan)
* Backward-compatible with old interface (which was using only QueryBuilder)
*/
public abstract class QueryPlan {
private final QueryBuilder _queryBuilder = new QueryBuilder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ protected void performJoin(Tuple stormTupleRcv, List<String> tuple,
// ValueOf is because of preaggregations, and it does not hurt
// in normal case
// TODO
StringBuilder oppositeTupleString = new StringBuilder(
oppositeStringTupleList.get(i));
StringBuilder oppositeTupleString = new StringBuilder(
String.valueOf(oppositeStringTupleList.get(i)));
lineageTimestamp = WindowSemanticsManager
.joinPreProcessingIfSlidingWindowSemantics(this,
oppositeTupleString, stormTupleRcv);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ public static boolean isStatisticsCollector(Map map, int hierarchyPosition) {
&& SystemParameters.getBoolean(map, "DIP_STATISTIC_COLLECTOR");
}

public static boolean isStoreTimestamp(Map map, int hierarchyPosition) {
public static boolean isStoreTimestamp(Map map, int hierarchyPosition) {
return (isWindowTimestampMode(map))
|| (isCustomTimestampMode(map)
&& hierarchyPosition == StormComponent.FINAL_COMPONENT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,14 @@
import ch.epfl.data.squall.predicates.BetweenPredicate;
import ch.epfl.data.squall.predicates.ComparisonPredicate;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.query_plans.QueryPlan;
import ch.epfl.data.squall.types.DateType;
import ch.epfl.data.squall.types.DoubleType;
import ch.epfl.data.squall.types.NumericType;
import ch.epfl.data.squall.types.StringType;
import ch.epfl.data.squall.types.Type;

public class TPCH5PlanAvg {
public class TPCH5PlanAvg extends QueryPlan {
private static void computeDates() {
// date2 = date1 + 1 year
final String date1Str = "1994-01-01";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import ch.epfl.data.squall.operators.AggregateOperator;
import ch.epfl.data.squall.operators.AggregateSumOperator;
import ch.epfl.data.squall.operators.ProjectOperator;
import ch.epfl.data.squall.predicates.ComparisonPredicate;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.query_plans.QueryPlan;
import ch.epfl.data.squall.query_plans.ThetaQueryPlansParameters;
Expand Down Expand Up @@ -75,7 +76,7 @@ public ThetaOutputDominatedPlan(String dataPath, String extension, Map conf) {
"NATION", dataPath + "nation" + extension)
.add(projectionNation).setOutputPartKey(hashNation);
_queryBuilder.add(relationNation);

final AggregateOperator agg = new AggregateSumOperator(
new ColumnReference(_doubleConv, 0), conf);
// Empty parameters = Cartesian Product
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public ThetaTPCH7Plan(String dataPath, String extension, Map conf) {
final AggregateOperator agg = new AggregateSumOperator(
new ColumnReference(_doubleConv, 4), conf).setGroupByColumns(
new ArrayList<Integer>(Arrays.asList(2, 0, 3)))
.SetWindowSemantics(5)
//.SetWindowSemantics(5)
;

final ColumnReference colN_C_O = new ColumnReference(_ic, 1);
Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_hyracks_l3_batch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME hyracks_l3_batch
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.debug.HyracksL3BatchPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.debug.HyracksL3BatchPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_hyracks_pre_agg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME hyracks_pre_agg
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.HyracksPreAggPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.HyracksPreAggPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_hyracks
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_hyracks
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaHyracksPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaHyracksPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_input_dominated
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaInputDominatedPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaInputDominatedPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_multiple_join
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaMultipleJoinPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaMultipleJoinPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_output_dominated
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaOutputDominatedPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaOutputDominatedPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_tpch10
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_tpch10
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaTPCH10Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaTPCH10Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_tpch4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_tpch4
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaTPCH4Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaTPCH4Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_tpch5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_tpch5
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaTPCH5Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaTPCH5Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_tpch7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_tpch7
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaTPCH7Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaTPCH7Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_tpch8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_tpch8
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaTPCH8Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaTPCH8Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_theta_tpch9
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME theta_tpch9
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.theta.ThetaTPCH9Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.theta.ThetaTPCH9Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch10
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch10
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH10Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH10Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch3
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch3
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH3Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH3Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 1

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch4
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH4Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH4Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch5
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH5Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH5Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 1

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch5avg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch5avg
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.debug.TPCH5PlanAvg
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.debug.TPCH5PlanAvg
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 1

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch7
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch7
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH7Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH7Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 1

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch8
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH8Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH8Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 1

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/0_01G_tpch9
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME tpch9
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.TPCH9Plan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.TPCH9Plan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down
2 changes: 1 addition & 1 deletion test/squall_plan_runner/confs/local/10K_rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
DIP_DISTRIBUTED false
DIP_QUERY_NAME rst
DIP_QUERY_PLAN ch.epfl.data.plan_runner.query_plans.RSTPlan
DIP_QUERY_PLAN ch.epfl.data.squall.examples.imperative.shj.RSTPlan
DIP_TOPOLOGY_NAME_PREFIX username
DIP_NUM_ACKERS 0

Expand Down

0 comments on commit 31504cd

Please sign in to comment.