Full Code of epfldata/squall for AI

master 9b5c9f14ead7 cached
876 files
27.7 MB
7.3M tokens
4418 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (29,267K chars total). Download the full file to get everything.
Repository: epfldata/squall
Branch: master
Commit: 9b5c9f14ead7
Files: 876
Total size: 27.7 MB

Directory structure:
gitextract_4ylla6p_/

├── .gitignore
├── .travis.yml
├── LICENSE
├── NOTICE
├── README.markdown
├── bin/
│   ├── install.sh
│   ├── recompile.sh
│   ├── squall_cluster.sh
│   ├── squall_local.sh
│   └── storm_env.sh
├── build.sbt
├── contrib/
│   ├── bheaven-0.0.3.jar
│   ├── storm-graphite-0.2.4-SNAPSHOT-all.jar
│   └── ujmp-complete-0.2.5.jar
├── project/
│   ├── build.properties
│   └── plugins.sbt
├── squall-core/
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── ch/
│       │           └── epfl/
│       │               └── data/
│       │                   └── squall/
│       │                       ├── api/
│       │                       │   └── sql/
│       │                       │       ├── estimators/
│       │                       │       │   ├── ConfigSelectivityEstimator.java
│       │                       │       │   ├── HardCodedSelectivities.java
│       │                       │       │   ├── JSQLTypeConverter.java
│       │                       │       │   ├── SelectivityEstimator.java
│       │                       │       │   └── SelingerSelectivityEstimator.java
│       │                       │       ├── main/
│       │                       │       │   └── ParserMain.java
│       │                       │       ├── optimizers/
│       │                       │       │   ├── CompGen.java
│       │                       │       │   ├── Optimizer.java
│       │                       │       │   ├── index/
│       │                       │       │   │   ├── CompLevel.java
│       │                       │       │   │   ├── EarlyProjection.java
│       │                       │       │   │   ├── IndexCompGen.java
│       │                       │       │   │   ├── IndexRuleOptimizer.java
│       │                       │       │   │   ├── IndexSimpleOptimizer.java
│       │                       │       │   │   ├── IndexTranslator.java
│       │                       │       │   │   ├── LevelAssigner.java
│       │                       │       │   │   ├── RuleParallelismAssigner.java
│       │                       │       │   │   └── TableSelector.java
│       │                       │       │   └── name/
│       │                       │       │       ├── CostEstimator.java
│       │                       │       │       ├── CostParallelismAssigner.java
│       │                       │       │       ├── CostParams.java
│       │                       │       │       ├── NameCompGen.java
│       │                       │       │       ├── NameCompGenFactory.java
│       │                       │       │       ├── NameCostOptimizer.java
│       │                       │       │       ├── NameManualOptimizer.java
│       │                       │       │       ├── NameManualParOptimizer.java
│       │                       │       │       ├── NameRuleOptimizer.java
│       │                       │       │       ├── NameTranslator.java
│       │                       │       │       ├── ProjGlobalCollect.java
│       │                       │       │       ├── ProjSchemaCreator.java
│       │                       │       │       └── manual_batching/
│       │                       │       │           ├── ClusterConstants.java
│       │                       │       │           ├── ManualBatchingCompGenFactory.java
│       │                       │       │           ├── ManualBatchingOptimizer.java
│       │                       │       │           └── ManualBatchingParallelismAssigner.java
│       │                       │       ├── schema/
│       │                       │       │   ├── ColumnNameType.java
│       │                       │       │   ├── Schema.java
│       │                       │       │   └── parser/
│       │                       │       │       ├── ParseException.java
│       │                       │       │       ├── SchemaParser.java
│       │                       │       │       ├── SchemaParserConstants.java
│       │                       │       │       ├── SchemaParserTokenManager.java
│       │                       │       │       ├── SimpleCharStream.java
│       │                       │       │       ├── Token.java
│       │                       │       │       └── TokenMgrError.java
│       │                       │       ├── util/
│       │                       │       │   ├── HierarchyExtractor.java
│       │                       │       │   ├── ImproperParallelismException.java
│       │                       │       │   ├── JoinTablesExprs.java
│       │                       │       │   ├── NotFromMyBranchException.java
│       │                       │       │   ├── ParserUtil.java
│       │                       │       │   ├── TableAliasName.java
│       │                       │       │   └── TupleSchema.java
│       │                       │       └── visitors/
│       │                       │           ├── jsql/
│       │                       │           │   ├── AndVisitor.java
│       │                       │           │   ├── ColumnCollectVisitor.java
│       │                       │           │   ├── JoinTablesExprsVisitor.java
│       │                       │           │   ├── MaxSubExpressionsVisitor.java
│       │                       │           │   ├── PrintVisitor.java
│       │                       │           │   └── SQLVisitor.java
│       │                       │           └── squall/
│       │                       │               ├── ColumnRefCollectVisitor.java
│       │                       │               ├── IndexJoinHashVisitor.java
│       │                       │               ├── IndexSelectItemsVisitor.java
│       │                       │               ├── IndexWhereVisitor.java
│       │                       │               ├── NameJoinHashVisitor.java
│       │                       │               ├── NameProjectVisitor.java
│       │                       │               ├── NameSelectItemsVisitor.java
│       │                       │               ├── NameWhereVisitor.java
│       │                       │               ├── VECollectPredVisitor.java
│       │                       │               └── VECollectVisitor.java
│       │                       ├── components/
│       │                       │   ├── AbstractComponent.java
│       │                       │   ├── AbstractJoinerComponent.java
│       │                       │   ├── Component.java
│       │                       │   ├── ComponentProperties.java
│       │                       │   ├── DataSourceComponent.java
│       │                       │   ├── EquiJoinComponent.java
│       │                       │   ├── JoinerComponent.java
│       │                       │   ├── OperatorComponent.java
│       │                       │   ├── hyper_cube/
│       │                       │   │   ├── HyperCubeJoinComponent.java
│       │                       │   │   └── HyperCubeJoinComponentFactory.java
│       │                       │   └── theta/
│       │                       │       ├── AdaptiveThetaJoinComponent.java
│       │                       │       ├── ThetaJoinComponent.java
│       │                       │       └── ThetaJoinComponentFactory.java
│       │                       ├── connectors/
│       │                       │   └── hdfs/
│       │                       │       └── HDFSmaterializer.java
│       │                       ├── ewh/
│       │                       │   ├── algorithms/
│       │                       │   │   ├── BSPAlgorithm.java
│       │                       │   │   ├── DenseMonotonicWeightPrecomputation.java
│       │                       │   │   ├── DenseWeightPrecomputation.java
│       │                       │   │   ├── InputOutputShallowCoarsener.java
│       │                       │   │   ├── InputShallowCoarsener.java
│       │                       │   │   ├── MCMCRandomWalkAlgorithm.java
│       │                       │   │   ├── OkcanAlgorithm.java
│       │                       │   │   ├── OkcanCandidateCoarsener.java
│       │                       │   │   ├── OkcanCandidateInputAlgorithm.java
│       │                       │   │   ├── OkcanCandidateOutputAlgorithm.java
│       │                       │   │   ├── OkcanCoarsener.java
│       │                       │   │   ├── OkcanExactCoarsener.java
│       │                       │   │   ├── OkcanExactInputAlgorithm.java
│       │                       │   │   ├── OkcanExactOutputAlgorithm.java
│       │                       │   │   ├── OutputShallowCoarsener.java
│       │                       │   │   ├── PWeightPrecomputation.java
│       │                       │   │   ├── ShallowCoarsener.java
│       │                       │   │   ├── TilingAlgorithm.java
│       │                       │   │   ├── WeightPrecomputation.java
│       │                       │   │   └── optimality/
│       │                       │   │       ├── MaxAvgOptimality.java
│       │                       │   │       ├── OptimalityMetricInterface.java
│       │                       │   │       └── WeightFunction.java
│       │                       │   ├── components/
│       │                       │   │   ├── DummyComponent.java
│       │                       │   │   ├── EWHSampleMatrixComponent.java
│       │                       │   │   ├── EquiDepthHistogramComponent.java
│       │                       │   │   └── OkcanSampleMatrixComponent.java
│       │                       │   ├── data_structures/
│       │                       │   │   ├── BooleanRegions.java
│       │                       │   │   ├── ExtremePositions.java
│       │                       │   │   ├── FixedSizePriorityQueue.java
│       │                       │   │   ├── FrequencyPosition.java
│       │                       │   │   ├── JoinMatrix.java
│       │                       │   │   ├── KeyPriorityProbability.java
│       │                       │   │   ├── KeyRegion.java
│       │                       │   │   ├── ListAdapter.java
│       │                       │   │   ├── ListJavaGeneric.java
│       │                       │   │   ├── ListTIntAdapter.java
│       │                       │   │   ├── ListTLongAdapter.java
│       │                       │   │   ├── MatrixIntInt.java
│       │                       │   │   ├── NumOfBuckets.java
│       │                       │   │   ├── Point.java
│       │                       │   │   ├── Region.java
│       │                       │   │   ├── SimpleMatrix.java
│       │                       │   │   ├── SparseMatrixUJMP.java
│       │                       │   │   ├── UJMPAdapterByteMatrix.java
│       │                       │   │   └── UJMPAdapterIntMatrix.java
│       │                       │   ├── examples/
│       │                       │   │   ├── EWHSampleMatrixPlan.java
│       │                       │   │   ├── OkcanSampleMatrixPlan.java
│       │                       │   │   ├── ThetaEWHBandJPS.java
│       │                       │   │   ├── ThetaEWHBandLineitemSelfOrderkeyJoin.java
│       │                       │   │   ├── ThetaEWHBandOrdersCustkeyCustkeyJoin.java
│       │                       │   │   ├── ThetaEWHBandOrdersOrderkeyCustkeyJoin.java
│       │                       │   │   ├── ThetaEWHBandPeer.java
│       │                       │   │   ├── ThetaEWHCustomerJoin.java
│       │                       │   │   ├── ThetaEWHEquiLineitemOrders.java
│       │                       │   │   ├── ThetaEWHEquiOrdersCustkeyCustkeyJoin.java
│       │                       │   │   ├── ThetaEWHLineitemSelfOutputDominatedJoin.java
│       │                       │   │   ├── ThetaEWHOrdersScaleJoin.java
│       │                       │   │   └── ThetaEWHPartSuppJoin.java
│       │                       │   ├── main/
│       │                       │   │   ├── PullStatisticCollector.java
│       │                       │   │   └── PushStatisticCollector.java
│       │                       │   ├── operators/
│       │                       │   │   └── SampleAsideAndForwardOperator.java
│       │                       │   ├── storm_components/
│       │                       │   │   ├── D2CombinerBolt.java
│       │                       │   │   ├── DummyBolt.java
│       │                       │   │   ├── EWHSampleMatrixBolt.java
│       │                       │   │   ├── EquiDepthHistogramBolt.java
│       │                       │   │   ├── OkcanSampleMatrixBolt.java
│       │                       │   │   ├── S1ReservoirGenerator.java
│       │                       │   │   ├── S1ReservoirMerge.java
│       │                       │   │   └── stream_grouping/
│       │                       │   │       ├── RangeFilteredMulticastStreamGrouping.java
│       │                       │   │       └── RangeMulticastStreamGrouping.java
│       │                       │   ├── utilities/
│       │                       │   │   ├── OverweightedException.java
│       │                       │   │   ├── TooSmallMaxWeightException.java
│       │                       │   │   └── TroveIntArrayTest.java
│       │                       │   └── visualize/
│       │                       │       ├── UJMPVisualizer.java
│       │                       │       └── VisualizerInterface.java
│       │                       ├── expressions/
│       │                       │   ├── Addition.java
│       │                       │   ├── ColumnReference.java
│       │                       │   ├── ConcatIntDouble.java
│       │                       │   ├── ConcatIntString.java
│       │                       │   ├── DateDiff.java
│       │                       │   ├── DateSum.java
│       │                       │   ├── Division.java
│       │                       │   ├── DoubleToInt.java
│       │                       │   ├── IntegerYearFromDate.java
│       │                       │   ├── LongPhone.java
│       │                       │   ├── Multiplication.java
│       │                       │   ├── StringConcatenate.java
│       │                       │   ├── Subtraction.java
│       │                       │   ├── ValueExpression.java
│       │                       │   └── ValueSpecification.java
│       │                       ├── main/
│       │                       │   └── Main.java
│       │                       ├── operators/
│       │                       │   ├── AggregateAvgOperator.java
│       │                       │   ├── AggregateCountOperator.java
│       │                       │   ├── AggregateOperator.java
│       │                       │   ├── AggregateStream.java
│       │                       │   ├── AggregateSumOperator.java
│       │                       │   ├── ChainOperator.java
│       │                       │   ├── CustomSampleOperatorReachGraph.java
│       │                       │   ├── DistinctOperator.java
│       │                       │   ├── MultiAggregateOperator.java
│       │                       │   ├── OneToOneOperator.java
│       │                       │   ├── Operator.java
│       │                       │   ├── PrintOperator.java
│       │                       │   ├── ProjectOperator.java
│       │                       │   ├── RedisOperator.java
│       │                       │   ├── SampleOperator.java
│       │                       │   ├── SelectOperator.java
│       │                       │   └── StoreOperator.java
│       │                       ├── predicates/
│       │                       │   ├── AndPredicate.java
│       │                       │   ├── BetweenPredicate.java
│       │                       │   ├── ComparisonPredicate.java
│       │                       │   ├── LikePredicate.java
│       │                       │   ├── OrPredicate.java
│       │                       │   ├── Predicate.java
│       │                       │   └── booleanPrimitive.java
│       │                       ├── query_plans/
│       │                       │   ├── QueryBuilder.java
│       │                       │   ├── QueryPlan.java
│       │                       │   └── ThetaQueryPlansParameters.java
│       │                       ├── storage/
│       │                       │   ├── AggregationStore.java
│       │                       │   ├── BasicStore.java
│       │                       │   ├── BitVector.java
│       │                       │   ├── KeyValueStore.java
│       │                       │   ├── TupleStorage.java
│       │                       │   ├── ValueStore.java
│       │                       │   ├── WindowAggregationStore.java
│       │                       │   ├── WindowKeyValueStore.java
│       │                       │   └── indexes/
│       │                       │       ├── BalancedBinaryTreeIndex.java
│       │                       │       ├── BplusTreeIndex.java
│       │                       │       ├── HashIndex.java
│       │                       │       └── Index.java
│       │                       ├── storm_components/
│       │                       │   ├── SignaledDataSourceComponentInterface.java
│       │                       │   ├── StormBoltComponent.java
│       │                       │   ├── StormComponent.java
│       │                       │   ├── StormDataSource.java
│       │                       │   ├── StormDstJoin.java
│       │                       │   ├── StormDstTupleStorageJoin.java
│       │                       │   ├── StormEmitter.java
│       │                       │   ├── StormJoinerBoltComponent.java
│       │                       │   ├── StormOperator.java
│       │                       │   ├── StormSpoutComponent.java
│       │                       │   ├── StormSrcHarmonizer.java
│       │                       │   ├── StormSrcJoin.java
│       │                       │   ├── StormSrcStorage.java
│       │                       │   ├── SynchronizedStormDataSourceInterface.java
│       │                       │   ├── hash_hypercube/
│       │                       │   │   └── HashHyperCubeGrouping.java
│       │                       │   ├── hybrid_hypercube/
│       │                       │   │   └── HybridHyperCubeGrouping.java
│       │                       │   ├── hyper_cube/
│       │                       │   │   ├── StormHyperCubeJoin.java
│       │                       │   │   ├── TradionalTwoWayJoin.java
│       │                       │   │   ├── TraditionalStormHyperCubeJoin.java
│       │                       │   │   └── stream_grouping/
│       │                       │   │       └── HyperCubeGrouping.java
│       │                       │   ├── stream_grouping/
│       │                       │   │   ├── BatchStreamGrouping.java
│       │                       │   │   ├── HashStreamGrouping.java
│       │                       │   │   └── ShuffleStreamGrouping.java
│       │                       │   ├── synchronization/
│       │                       │   │   └── TopologyKiller.java
│       │                       │   └── theta/
│       │                       │       ├── StormThetaJoin.java
│       │                       │       └── stream_grouping/
│       │                       │           ├── ContentInsensitiveThetaJoinGrouping.java
│       │                       │           └── ContentSensitiveThetaJoinGrouping.java
│       │                       ├── thetajoin/
│       │                       │   ├── adaptive/
│       │                       │   │   ├── advisor/
│       │                       │   │   │   ├── Action.java
│       │                       │   │   │   ├── Advisor.java
│       │                       │   │   │   ├── Discard.java
│       │                       │   │   │   ├── Maybe.java
│       │                       │   │   │   ├── Migration.java
│       │                       │   │   │   └── TheoreticalAdvisorNew.java
│       │                       │   │   ├── storm_component/
│       │                       │   │   │   ├── Quadruple.java
│       │                       │   │   │   ├── ThetaJoinerAdaptiveAdvisedEpochs.java
│       │                       │   │   │   └── ThetaReshufflerAdvisedEpochs.java
│       │                       │   │   └── storm_matrix_mapping/
│       │                       │   │       ├── ThetaDataMigrationJoinerToReshufflerMapping.java
│       │                       │   │       └── ThetaJoinAdaptiveMapping.java
│       │                       │   ├── matrix_assignment/
│       │                       │   │   ├── ArrangementIterator.java
│       │                       │   │   ├── CellIterator.java
│       │                       │   │   ├── ContentInsensitiveMatrixAssignment.java
│       │                       │   │   ├── ContentSensitiveMatrixAssignment.java
│       │                       │   │   ├── CostModel.java
│       │                       │   │   ├── CubeNAssignmentBruteForce.java
│       │                       │   │   ├── CubeNAssignmentEqui.java
│       │                       │   │   ├── HashHyperCubeAssignment.java
│       │                       │   │   ├── HashHyperCubeAssignmentBruteForce.java
│       │                       │   │   ├── HybridHyperCubeAssignment.java
│       │                       │   │   ├── HybridHyperCubeAssignmentBruteForce.java
│       │                       │   │   ├── HyperCubeAssignerFactory.java
│       │                       │   │   ├── HyperCubeAssignment.java
│       │                       │   │   ├── MBucketIPartitioning.java
│       │                       │   │   ├── ManualHybridHyperCubeAssignment.java
│       │                       │   │   ├── MatrixAssignment.java
│       │                       │   │   ├── SetArrangementIterator.java
│       │                       │   │   ├── Utilities.java
│       │                       │   │   └── exp/
│       │                       │   │       ├── HCEquiPartitionExp.java
│       │                       │   │       ├── HCPartitionExp.java
│       │                       │   │       └── TimeoutController.java
│       │                       │   └── predicate_analyser/
│       │                       │       └── PredicateAnalyser.java
│       │                       ├── types/
│       │                       │   ├── DateIntegerType.java
│       │                       │   ├── DateLongType.java
│       │                       │   ├── DateType.java
│       │                       │   ├── DoubleType.java
│       │                       │   ├── IntegerType.java
│       │                       │   ├── LongType.java
│       │                       │   ├── NumericType.java
│       │                       │   ├── StringType.java
│       │                       │   ├── SumCount.java
│       │                       │   ├── SumCountType.java
│       │                       │   └── Type.java
│       │                       ├── utilities/
│       │                       │   ├── CustomReader.java
│       │                       │   ├── DeepCopy.java
│       │                       │   ├── FileReaderProvider.java
│       │                       │   ├── LocalMergeResults.java
│       │                       │   ├── MyUtilities.java
│       │                       │   ├── PartitioningScheme.java
│       │                       │   ├── PeriodicAggBatchSend.java
│       │                       │   ├── ReaderProvider.java
│       │                       │   ├── SerializableFileInputStream.java
│       │                       │   ├── SerializableHDFSFileInputStream.java
│       │                       │   ├── SquallContext.java
│       │                       │   ├── SquallSerializationDelegate.java
│       │                       │   ├── StormWrapper.java
│       │                       │   ├── SystemParameters.java
│       │                       │   ├── statistics/
│       │                       │   │   └── StatisticsUtilities.java
│       │                       │   └── thetajoin/
│       │                       │       └── dynamic/
│       │                       │           ├── BufferedTuple.java
│       │                       │           ├── ThetaJoinUtilities.java
│       │                       │           └── ThetaState.java
│       │                       ├── visitors/
│       │                       │   ├── OperatorVisitor.java
│       │                       │   ├── PredicateCreateIndexesVisitor.java
│       │                       │   ├── PredicateUpdateIndexesVisitor.java
│       │                       │   ├── PredicateVisitor.java
│       │                       │   └── ValueExpressionVisitor.java
│       │                       └── window_semantics/
│       │                           └── WindowSemanticsManager.java
│       └── test/
│           └── scala/
│               ├── HyracksTest.scala
│               ├── RSTTest.scala
│               ├── TPCHTest.scala
│               ├── TestSuite.scala
│               ├── ThetaTest.scala
│               └── sql/
│                   ├── SqlHyracksTest.scala
│                   ├── SqlTpch10Test.scala
│                   ├── SqlTpch12Test.scala
│                   ├── SqlTpch3Test.scala
│                   ├── SqlTpch4Test.scala
│                   ├── SqlTpch5Test.scala
│                   ├── SqlTpch6Test.scala
│                   ├── SqlTpch7Test.scala
│                   ├── SqlTpch8Test.scala
│                   └── SqlTpch9Test.scala
├── squall-examples/
│   └── squall-java-examples/
│       └── src/
│           └── ch/
│               └── epfl/
│                   └── data/
│                       └── squall/
│                           └── examples/
│                               └── imperative/
│                                   ├── debug/
│                                   │   ├── HyracksL1Plan.java
│                                   │   ├── HyracksL1SelectDatePlan.java
│                                   │   ├── HyracksL1SelectIntPlan.java
│                                   │   ├── HyracksL3BatchPlan.java
│                                   │   ├── HyracksL3Plan.java
│                                   │   ├── TPCH10_CustomPlan.java
│                                   │   ├── TPCH3L1Plan.java
│                                   │   ├── TPCH3L23Plan.java
│                                   │   ├── TPCH3L2Plan.java
│                                   │   ├── TPCH5PlanAvg.java
│                                   │   ├── TPCH5_CustomPlan.java
│                                   │   ├── TPCH5_R_N_S_LPlan.java
│                                   │   ├── TPCH7_CustomPlan.java
│                                   │   ├── TPCH7_L_S_N1Plan.java
│                                   │   ├── TPCH8_9_P_LPlan.java
│                                   │   ├── TPCH9_CustomPlan.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated2_32.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated4_16.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated8_8.java
│                                   │   ├── ThetaTPCH5_R_N_S_LPlan.java
│                                   │   ├── ThetaTPCH7_CustomPlan.java
│                                   │   ├── ThetaTPCH7_L_S_N1Plan.java
│                                   │   └── ThetaTPCH8_9_P_LPlan.java
│                                   ├── shj/
│                                   │   ├── HyracksPlan.java
│                                   │   ├── HyracksPreAggPlan.java
│                                   │   ├── HyracksPredicatePlan.java
│                                   │   ├── RSTPlan.java
│                                   │   ├── SimpleAggregationPlan.java
│                                   │   ├── TPCH10Plan.java
│                                   │   ├── TPCH3Plan.java
│                                   │   ├── TPCH3PredicatePlan.java
│                                   │   ├── TPCH4Plan.java
│                                   │   ├── TPCH5Plan.java
│                                   │   ├── TPCH5PredicatePlan.java
│                                   │   ├── TPCH7Plan.java
│                                   │   ├── TPCH7PlanHDFSMaterializer.java
│                                   │   ├── TPCH8Plan.java
│                                   │   └── TPCH9Plan.java
│                                   ├── theta/
│                                   │   ├── ThetaHyracksPlan.java
│                                   │   ├── ThetaInputDominatedPlan.java
│                                   │   ├── ThetaLineitemPricesSelfJoin.java
│                                   │   ├── ThetaLineitemSelfJoin.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated.java
│                                   │   ├── ThetaMultipleJoinPlan.java
│                                   │   ├── ThetaOrdersSelfJoin.java
│                                   │   ├── ThetaOutputDominatedPlan.java
│                                   │   ├── ThetaTPCH10Plan.java
│                                   │   ├── ThetaTPCH3Plan.java
│                                   │   ├── ThetaTPCH4Plan.java
│                                   │   ├── ThetaTPCH5Plan.java
│                                   │   ├── ThetaTPCH7Plan.java
│                                   │   ├── ThetaTPCH8Plan.java
│                                   │   └── ThetaTPCH9Plan.java
│                                   └── traditional/
│                                       ├── TradionalHypercubeThetaHyracksPlan.java
│                                       ├── TraditionalGoogleMostFailedMachine.java
│                                       ├── TraditionalHashTPCH3Plan.java
│                                       ├── TraditionalHashTPCH9PartialPlan.java
│                                       ├── TraditionalHybridReachability.java
│                                       ├── TraditionalHybridTPCH3Plan.java
│                                       ├── TraditionalHybridTPCH9PartialPlan.java
│                                       ├── TraditionalHybridUrlReachability.java
│                                       ├── TraditionalHyracksPlan.java
│                                       ├── TraditionalTPCH3Plan.java
│                                       └── TraditionalTPCH5Plan.java
├── squall-functional/
│   ├── macros/
│   │   └── Macros.scala
│   └── src/
│       └── main/
│           └── scala/
│               └── ch/
│                   └── epfl/
│                       └── data/
│                           └── squall/
│                               └── api/
│                                   └── scala/
│                                       ├── REPL.scala
│                                       ├── SquallType.scala
│                                       ├── Stream.scala
│                                       ├── TPCHSchema.scala
│                                       ├── operators/
│                                       │   ├── ScalaAggregateOperator.scala
│                                       │   ├── ScalaAggregationStorage.scala
│                                       │   ├── ScalaFlatMapOperator.scala
│                                       │   ├── ScalaMapOperator.scala
│                                       │   ├── ScalaWindowAggregationStore.scala
│                                       │   └── predicates/
│                                       │       └── ScalaPredicate.scala
│                                       └── queries/
│                                           ├── ScalaHyracksPlan.scala
│                                           ├── ScalaTPCH3Plan.scala
│                                           └── ScalaTPCH7Plan.scala
├── squall-signals/
│   └── src/
│       ├── examples/
│       │   └── ch/
│       │       └── epfl/
│       │           └── data/
│       │               └── squall/
│       │                   └── examples/
│       │                       └── imperative/
│       │                           └── sync/
│       │                               └── TestSync.java
│       └── main/
│           └── java/
│               └── ch/
│                   └── epfl/
│                       └── data/
│                           └── squall/
│                               └── components/
│                                   └── signal_components/
│                                       ├── DistributionSignalSpout.java
│                                       ├── HarmonizerSignalSpout.java
│                                       ├── Histogram.java
│                                       ├── SignalUtilities.java
│                                       ├── SignaledDataSourceComponent.java
│                                       ├── StormSynchronizedSpoutComponent.java
│                                       ├── SynchronizedStormDataSource.java
│                                       └── storm/
│                                           ├── AbstractSignalConnection.java
│                                           ├── BaseSignalBolt.java
│                                           ├── BaseSignalSpout.java
│                                           ├── SignalClient.java
│                                           ├── SignalListener.java
│                                           ├── StandaloneSignalConnection.java
│                                           └── StormSignalConnection.java
└── test/
    ├── data/
    │   ├── google/
    │   │   ├── README
    │   │   ├── job_events.csv
    │   │   ├── machine_attributes.csv
    │   │   ├── machine_events.csv
    │   │   ├── schema.csv
    │   │   ├── task_constraints.csv
    │   │   ├── task_events.csv
    │   │   └── task_usage.csv
    │   ├── jps/
    │   │   └── 12K/
    │   │       ├── generate_synthetic_jps.py
    │   │       ├── jps_1.tbl
    │   │       └── jps_2.tbl
    │   ├── link_graph/
    │   │   └── 0.01G/
    │   │       ├── sd-arc.txt
    │   │       └── sd-index.txt
    │   ├── pavlo_torrent/
    │   │   ├── sample/
    │   │   │   └── peersnapshot-01.tbl
    │   │   └── schema.txt
    │   └── tpch/
    │       └── 0.01G/
    │           ├── customer.tbl
    │           ├── lineitem.tbl
    │           ├── nation.tbl
    │           ├── orders.tbl
    │           ├── part.tbl
    │           ├── partsupp.tbl
    │           ├── region.tbl
    │           └── supplier.tbl
    ├── results/
    │   ├── link_graph/
    │   │   └── 0.01G/
    │   │       └── reachability_3.result
    │   ├── rst/
    │   │   └── 10K/
    │   │       └── rst.result
    │   └── tpch/
    │       ├── 0.01G/
    │       │   ├── hyracks.result
    │       │   ├── theta_input_dominated.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_lines_self_join_mat.result
    │       │   ├── theta_multiple_join.result
    │       │   ├── theta_output_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   ├── theta_tpch7_L_S_N1.result
    │       │   ├── tpch10.result
    │       │   ├── tpch12.result
    │       │   ├── tpch17.result
    │       │   ├── tpch19.result
    │       │   ├── tpch3.result
    │       │   ├── tpch4.result
    │       │   ├── tpch5.result
    │       │   ├── tpch5avg.result
    │       │   ├── tpch6.result
    │       │   ├── tpch7.result
    │       │   ├── tpch8.result
    │       │   └── tpch9.result
    │       ├── 0.01G_z1/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       ├── 0.01G_z2/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       ├── 0.01G_z3/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       ├── 0.01G_z4/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       └── 0.1G/
    │           ├── distinct_hyracks.result
    │           ├── hyracks.result
    │           ├── hyracks_l3_batch.result
    │           ├── hyracks_pre_agg.result
    │           ├── theta_hyracks.result
    │           ├── theta_input_dominated.result
    │           ├── theta_multiple_join.result
    │           ├── theta_output_dominated.result
    │           ├── theta_tpch7.result
    │           ├── tpch10.result
    │           ├── tpch19.result
    │           ├── tpch3.result
    │           ├── tpch4.result
    │           ├── tpch5.result
    │           ├── tpch7.result
    │           ├── tpch8.result
    │           └── tpch9.result
    ├── squall/
    │   ├── confs/
    │   │   ├── cluster/
    │   │   │   ├── 40G_hyracks
    │   │   │   ├── 40G_tpch3
    │   │   │   ├── 40G_tpch7
    │   │   │   └── 40G_z0_hyracks_16J_1_11
    │   │   ├── local/
    │   │   │   ├── 0_01G_distinct_hyracks_ncl
    │   │   │   ├── 0_01G_hyracks_irb
    │   │   │   ├── 0_01G_hyracks_is
    │   │   │   ├── 0_01G_hyracks_ncl
    │   │   │   ├── 0_01G_hyracks_nmcl
    │   │   │   ├── 0_01G_hyracks_nmpl
    │   │   │   ├── 0_01G_hyracks_nrl
    │   │   │   ├── 0_01G_tpch10_irb
    │   │   │   ├── 0_01G_tpch10_ncl
    │   │   │   ├── 0_01G_tpch10_nmcl
    │   │   │   ├── 0_01G_tpch10_nrl
    │   │   │   ├── 0_01G_tpch12_ncl
    │   │   │   ├── 0_01G_tpch3_irb
    │   │   │   ├── 0_01G_tpch3_is
    │   │   │   ├── 0_01G_tpch3_ncl
    │   │   │   ├── 0_01G_tpch3_nmcl
    │   │   │   ├── 0_01G_tpch3_nrl
    │   │   │   ├── 0_01G_tpch4_ncl
    │   │   │   ├── 0_01G_tpch5_irb
    │   │   │   ├── 0_01G_tpch5_ncl
    │   │   │   ├── 0_01G_tpch5_nmcl
    │   │   │   ├── 0_01G_tpch5_nrl
    │   │   │   ├── 0_01G_tpch6_ncl
    │   │   │   ├── 0_01G_tpch7_irb
    │   │   │   ├── 0_01G_tpch7_ncl
    │   │   │   ├── 0_01G_tpch7_nmcl
    │   │   │   ├── 0_01G_tpch7_nrl
    │   │   │   ├── 0_01G_tpch8_irb
    │   │   │   ├── 0_01G_tpch8_ncl
    │   │   │   ├── 0_01G_tpch8_nmcl
    │   │   │   ├── 0_01G_tpch8_nrl
    │   │   │   ├── 0_01G_tpch9_irb
    │   │   │   ├── 0_01G_tpch9_ncl
    │   │   │   ├── 0_01G_tpch9_nmcl
    │   │   │   └── 0_01G_tpch9_nrl
    │   │   └── manual_batching/
    │   │       ├── cluster/
    │   │       │   ├── B16_10G_hyracks
    │   │       │   ├── B16_10G_tpch3
    │   │       │   ├── B16_10G_tpch5
    │   │       │   ├── B1K_10G_hyracks
    │   │       │   ├── B1K_10G_tpch10
    │   │       │   ├── B1K_10G_tpch12
    │   │       │   ├── B1K_10G_tpch3
    │   │       │   ├── B1K_10G_tpch4
    │   │       │   ├── B1K_10G_tpch5
    │   │       │   ├── B1K_10G_tpch6
    │   │       │   ├── B1K_10G_tpch9
    │   │       │   ├── B1_10G_hyracks
    │   │       │   ├── B1_10G_tpch3
    │   │       │   ├── B1_10G_tpch5
    │   │       │   ├── B256_10G_hyracks
    │   │       │   ├── B256_10G_tpch3
    │   │       │   ├── B256_10G_tpch5
    │   │       │   ├── B4K_10G_hyracks
    │   │       │   ├── B4_10G_hyracks
    │   │       │   ├── B4_10G_tpch3
    │   │       │   ├── B4_10G_tpch5
    │   │       │   ├── B4k_10G_tpch3
    │   │       │   ├── B4k_10G_tpch5
    │   │       │   ├── B64_10G_hyracks
    │   │       │   ├── B64_10G_tpch3
    │   │       │   └── B64_10G_tpch5
    │   │       └── local/
    │   │           ├── 0_01G_hyracks_local
    │   │           ├── 0_01G_tpch10_local
    │   │           ├── 0_01G_tpch12_local
    │   │           ├── 0_01G_tpch3_local
    │   │           ├── 0_01G_tpch4_local
    │   │           ├── 0_01G_tpch5_local
    │   │           ├── 0_01G_tpch6_local
    │   │           └── 0_01G_tpch9_local
    │   ├── schemas/
    │   │   ├── Ex1.txt
    │   │   ├── Ex2.txt
    │   │   ├── rst.txt
    │   │   └── tpch.txt
    │   └── sql_queries/
    │       ├── distinct_hyracks.sql
    │       ├── hyracks.sql
    │       ├── misc.sql
    │       ├── tpch10.sql
    │       ├── tpch12.sql
    │       ├── tpch19.sql
    │       ├── tpch3.sql
    │       ├── tpch4.sql
    │       ├── tpch5.sql
    │       ├── tpch6.sql
    │       ├── tpch7.sql
    │       ├── tpch8.sql
    │       └── tpch9.sql
    └── squall_plan_runner/
        └── confs/
            ├── cluster/
            │   ├── 10G_dbtoaster_hash_hypercube_hyracks
            │   ├── 10G_dbtoaster_hash_hypercube_hyracks_redis
            │   ├── 10G_dbtoaster_hash_hypercube_tpch10
            │   ├── 10G_dbtoaster_hash_hypercube_tpch3
            │   ├── 10G_dbtoaster_hash_hypercube_tpch5
            │   ├── 10G_dbtoaster_hash_hypercube_tpch9
            │   ├── 10G_dbtoaster_hash_hypercube_tpch9_partial
            │   ├── 10G_dbtoaster_hybrid_hypercube_hyracks
            │   ├── 10G_dbtoaster_hybrid_hypercube_manual_hyracks
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch3
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch5
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch9
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch9_partial
            │   ├── 10G_dbtoaster_hyracks
            │   ├── 10G_dbtoaster_seqjoin_tpch3
            │   ├── 10G_dbtoaster_seqjoin_tpch3_hash
            │   ├── 10G_dbtoaster_seqjoin_tpch5
            │   ├── 10G_dbtoaster_seqjoin_tpch5_hash
            │   ├── 10G_dbtoaster_tpch10
            │   ├── 10G_dbtoaster_tpch3
            │   ├── 10G_dbtoaster_tpch5
            │   ├── 10G_dbtoaster_tpch9
            │   ├── 10G_dbtoaster_tpch9_partial
            │   ├── 10G_dbtoaster_z1_hyracks
            │   ├── 10G_theta_hyracks
            │   ├── 10G_traditional_hash_hypercube_hyracks
            │   ├── 10G_traditional_hash_hypercube_tpch3
            │   ├── 10G_traditional_hash_hypercube_tpch9_partial
            │   ├── 10G_traditional_hybrid_hypercube_hyracks
            │   ├── 10G_traditional_hybrid_hypercube_tpch3
            │   ├── 10G_traditional_hybrid_hypercube_tpch9_partial
            │   ├── 10G_traditional_random_hypercube_hyracks
            │   ├── 10G_traditional_random_hypercube_tpch3
            │   ├── 10G_traditional_random_hypercube_tpch9_partial
            │   ├── 10G_traditional_tpch5
            │   ├── 10G_z0_hyracks
            │   ├── 10G_z0_tpch3_4
            │   ├── 10G_z0_tpch7_4
            │   ├── 10G_z1_hyracks
            │   ├── 1G_dbtoaster_hash_hypercube_tpch5
            │   ├── 1G_hyracks
            │   ├── dbtoaster_google_failed
            │   ├── dbtoaster_google_failed_traditional
            │   ├── dbtoaster_hash_hypercube_reachability
            │   ├── dbtoaster_hash_hypercube_reachability_seq
            │   ├── dbtoaster_hash_hypercube_url_reachability
            │   ├── dbtoaster_hash_hypercube_url_reachability_skewed
            │   ├── dbtoaster_hybrid_hypercube_url_reachability
            │   ├── dbtoaster_hybrid_hypercube_url_reachability_skewed
            │   ├── dbtoaster_reachability
            │   └── dbtoaster_reachability_seq
            ├── extra-local/
            │   ├── 0_01G_test_sync
            │   ├── 0_01G_test_sync2
            │   ├── 0_01G_theta_output_dominated
            │   ├── 0_01G_tpch7HDFS_Materializer
            │   └── 0_01G_tpch7HDFS_Source
            ├── local/
            │   ├── 0_01G_hyracks
            │   ├── 0_01G_hyracks_l3_batch
            │   ├── 0_01G_hyracks_pre_agg
            │   ├── 0_01G_scalahyracks
            │   ├── 0_01G_theta_hyracks
            │   ├── 0_01G_theta_input_dominated
            │   ├── 0_01G_theta_multiple_join
            │   ├── 0_01G_theta_tpch10
            │   ├── 0_01G_theta_tpch3
            │   ├── 0_01G_theta_tpch4
            │   ├── 0_01G_theta_tpch5
            │   ├── 0_01G_theta_tpch7
            │   ├── 0_01G_theta_tpch8
            │   ├── 0_01G_theta_tpch9
            │   ├── 0_01G_tpch10
            │   ├── 0_01G_tpch3
            │   ├── 0_01G_tpch4
            │   ├── 0_01G_tpch5
            │   ├── 0_01G_tpch5avg
            │   ├── 0_01G_tpch7
            │   ├── 0_01G_tpch8
            │   ├── 0_01G_tpch9
            │   ├── 0_01G_traditional_hash_hypercube_hyracks
            │   ├── 0_01G_traditional_hash_hypercube_tpch3
            │   ├── 0_01G_traditional_hybrid_hypercube_hyracks
            │   ├── 0_01G_traditional_hyracks
            │   ├── 0_01G_traditional_random_hypercube_hyracks
            │   ├── 0_01G_traditional_tpch3
            │   ├── 0_01G_traditional_tpch5
            │   ├── 10K_rst
            │   ├── traditional_reachability
            │   └── traditional_url_reachability
            ├── low_selectivity/
            │   ├── ewh_sample/
            │   │   └── local/
            │   │       └── eclipse-run/
            │   │           ├── 0_01G_lineitem_self_input
            │   │           ├── 0_01G_theta_line_self_join
            │   │           ├── 0_01G_theta_tpch7_L_S_N1
            │   │           └── sample_peer_self
            │   ├── push/
            │   │   └── local/
            │   │       ├── console/
            │   │       │   ├── 0_01G_theta_hyracks
            │   │       │   ├── 0_01G_theta_line_self_join
            │   │       │   ├── 0_01G_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z1_theta_hyracks
            │   │       │   ├── 0_01G_z1_theta_line_self_join
            │   │       │   ├── 0_01G_z1_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z1_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z1_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z2_theta_hyracks
            │   │       │   ├── 0_01G_z2_theta_line_self_join
            │   │       │   ├── 0_01G_z2_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z2_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z2_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z3_theta_hyracks
            │   │       │   ├── 0_01G_z3_theta_line_self_join
            │   │       │   ├── 0_01G_z3_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z3_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z3_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z4_theta_hyracks
            │   │       │   ├── 0_01G_z4_theta_line_self_join
            │   │       │   ├── 0_01G_z4_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z4_theta_tpch5_R_N_S_L
            │   │       │   └── 0_01G_z4_theta_tpch7_L_S_N1
            │   │       ├── console-joiners/
            │   │       │   ├── 0_01G_theta_hyracks_16J
            │   │       │   ├── 0_01G_theta_hyracks_32J
            │   │       │   ├── 0_01G_theta_hyracks_64J
            │   │       │   ├── 0_01G_theta_hyracks_8J
            │   │       │   ├── 0_01G_theta_hyracks_l128J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_16J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_32J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_64J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_8J
            │   │       │   └── 0_01G_z1_theta_line_self_join_l128J
            │   │       ├── console-run/
            │   │       │   ├── 0_01G_theta_hyracks
            │   │       │   ├── 0_01G_theta_line_self_join
            │   │       │   ├── 0_01G_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z1_theta_hyracks
            │   │       │   ├── 0_01G_z1_theta_line_self_join
            │   │       │   ├── 0_01G_z1_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z1_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z1_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z2_theta_hyracks
            │   │       │   ├── 0_01G_z2_theta_line_self_join
            │   │       │   ├── 0_01G_z2_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z2_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z2_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z3_theta_hyracks
            │   │       │   ├── 0_01G_z3_theta_line_self_join
            │   │       │   ├── 0_01G_z3_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z3_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z3_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z4_theta_hyracks
            │   │       │   ├── 0_01G_z4_theta_line_self_join
            │   │       │   ├── 0_01G_z4_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z4_theta_tpch5_R_N_S_L
            │   │       │   └── 0_01G_z4_theta_tpch7_L_S_N1
            │   │       └── eclipse-run/
            │   │           ├── 0_01G_theta_hyracks
            │   │           ├── 0_01G_theta_line_self_join
            │   │           ├── 0_01G_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z1_theta_hyracks
            │   │           ├── 0_01G_z1_theta_line_self_join
            │   │           ├── 0_01G_z1_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z1_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_z1_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z2_theta_hyracks
            │   │           ├── 0_01G_z2_theta_line_self_join
            │   │           ├── 0_01G_z2_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z2_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_z2_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z3_theta_hyracks
            │   │           ├── 0_01G_z3_theta_line_self_join
            │   │           ├── 0_01G_z3_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z3_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_z3_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z4_theta_hyracks
            │   │           ├── 0_01G_z4_theta_line_self_join
            │   │           ├── 0_01G_z4_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z4_theta_tpch5_R_N_S_L
            │   │           └── 0_01G_z4_theta_tpch7_L_S_N1
            │   └── sample/
            │       └── local/
            │           ├── eclipse-generic/
            │           │   ├── 0_01G_theta_line_self_join
            │           │   └── 0_01G_theta_tpch7_L_S_N1
            │           └── eclipse-run/
            │               ├── 0_01G_theta_line_self_join
            │               └── 0_01G_theta_tpch7_L_S_N1
            ├── manual_batching/
            │   ├── config_template.txt
            │   ├── latency/
            │   │   └── local/
            │   │       ├── 0_01G_theta_tpch5_test
            │   │       ├── 10G_uniform_static_naive_bnci
            │   │       └── 10G_uniform_static_opt_bnci
            │   ├── parallel/
            │   │   ├── formula/
            │   │   │   ├── 10G_hyracks_parallel
            │   │   │   ├── 10K_rst_parallel
            │   │   │   ├── 1G_hyracksPreAgg_parallel
            │   │   │   ├── 1G_hyracks_parallel
            │   │   │   ├── 1G_tpch3_parallel_4
            │   │   │   ├── 1G_tpch7_parallel_4
            │   │   │   ├── 5G_hyracks_parallel
            │   │   │   ├── 5G_hyracks_parallel_t2
            │   │   │   └── 8G_tpch7_parallel_1
            │   │   └── guess/
            │   │       ├── 1G_tpch7_parallel_16_formula
            │   │       ├── 1G_tpch7_parallel_16_opt
            │   │       ├── 1G_tpch7_parallel_16_opt_32ACK
            │   │       ├── 1G_tpch7_parallel_1_20
            │   │       ├── 1G_tpch7_parallel_1_20_F1
            │   │       ├── 1G_tpch7_parallel_1_20_F16
            │   │       ├── 1G_tpch7_parallel_1_20_F3
            │   │       ├── 1G_tpch7_parallel_1_2x
            │   │       ├── 1G_tpch7_parallel_2_20
            │   │       ├── 1G_tpch7_parallel_2_20_8ACK
            │   │       ├── 1G_tpch7_parallel_2_20_BB
            │   │       ├── 1G_tpch7_parallel_2_20_SB
            │   │       ├── 1G_tpch7_parallel_2_20_formula
            │   │       ├── 1G_tpch7_parallel_2_2x
            │   │       ├── 1G_tpch7_parallel_4_20
            │   │       ├── 1G_tpch7_parallel_4_20_formula
            │   │       ├── 1G_tpch7_parallel_4_2x
            │   │       ├── 1G_tpch7_parallel_4_2xx
            │   │       ├── 1G_tpch7_parallel_8_20
            │   │       ├── 1G_tpch7_parallel_8_2EQ
            │   │       ├── 1G_tpch7_parallel_8_2x
            │   │       ├── 1G_tpch7_parallel_8_2xx
            │   │       ├── 1G_tpch7_parallel_8_2xxx
            │   │       ├── 1G_tpch7_parallel_8_opt
            │   │       ├── 1G_tpch7_parallel_old
            │   │       ├── 4G_hyracks_parallel_t1
            │   │       ├── 5G_hyracksPreAgg_parallel_t1
            │   │       └── 5G_hyracksPreAgg_parallel_t2
            │   └── serial/
            │       ├── 0.01G_hyracks_pre_agg_serial
            │       ├── 0.01G_hyracks_serial
            │       ├── 0.01G_theta_hyracks_serial
            │       ├── 0.01G_theta_input_dominated_serial
            │       ├── 0.01G_theta_multiple_join_serial
            │       ├── 0.01G_theta_output_dominated_serial
            │       ├── 0.01G_theta_tpch7_serial
            │       ├── 0.01G_tpch10_serial
            │       ├── 0.01G_tpch3_serial
            │       ├── 0.01G_tpch4_serial
            │       ├── 0.01G_tpch5_serial
            │       ├── 0.01G_tpch7_serial
            │       ├── 0.01G_tpch8_serial
            │       ├── 0.01G_tpch9_serial
            │       └── 10K_rst_serial
            └── squall-ui/
                ├── google_failed_h1_hash-local1_dbtoaster-8
                ├── google_failed_h1_hash-local1_traditional-8
                ├── google_failed_h1_hybrid-local1_dbtoaster-8
                ├── google_failed_h1_hybrid-local1_traditional-8
                ├── google_failed_h1_random-local1_dbtoaster-8
                ├── google_failed_h1_random-local1_traditional-8
                ├── hyrakcs_h1_hash-local1_dbtoaster-16
                ├── hyrakcs_h1_hash-local1_traditional-16
                ├── hyrakcs_h1_hybrid-local1_dbtoaster-16
                ├── hyrakcs_h1_hybrid-local1_traditional-16
                ├── hyrakcs_h1_random-local1_dbtoaster-16
                ├── hyrakcs_h1_random-local1_traditional-16
                ├── reachability_h1_hash-local1_dbtoaster-36
                ├── reachability_h1_hash-local1_traditional-36
                ├── reachability_h1_hybrid-local1_dbtoaster-36
                ├── reachability_h1_hybrid-local1_traditional-36
                ├── reachability_h1_random-local1_dbtoaster-36
                ├── reachability_h1_random-local1_traditional-36
                ├── seq_reachability_h1_hash-local1_dbtoaster-h2_hash-local2_dbtoaster-36
                ├── seq_reachability_h1_hash-local1_dbtoaster-h2_hybrid-local2_dbtoaster-36
                ├── seq_reachability_h1_hash-local1_dbtoaster-h2_random-local2_dbtoaster-36
                ├── seq_reachability_h1_hybrid-local1_dbtoaster-h2_hash-local2_dbtoaster-36
                ├── seq_reachability_h1_hybrid-local1_dbtoaster-h2_hybrid-local2_dbtoaster-36
                ├── seq_reachability_h1_random-local1_dbtoaster-h2_hash-local2_dbtoaster-36
                ├── seq_reachability_h1_random-local1_dbtoaster-h2_hybrid-local2_dbtoaster-36
                ├── seq_reachability_h1_random-local1_dbtoaster-h2_random-local2_dbtoaster-36
                ├── tpch9_partial_h1_hash-local1_dbtoaster-8
                ├── tpch9_partial_h1_hash-local1_traditional-8
                ├── tpch9_partial_h1_hybrid-local1_dbtoaster-8
                ├── tpch9_partial_h1_hybrid-local1_traditional-8
                ├── tpch9_partial_h1_random-local1_dbtoaster-8
                ├── tpch9_partial_h1_random-local1_traditional-8
                ├── url_reachability_skewed_h1_hash-local1_dbtoaster-40
                ├── url_reachability_skewed_h1_hash-local1_traditional-40
                ├── url_reachability_skewed_h1_hybrid-local1_dbtoaster-40
                ├── url_reachability_skewed_h1_hybrid-local1_traditional-40
                ├── url_reachability_skewed_h1_random-local1_dbtoaster-40
                └── url_reachability_skewed_h1_random-local1_tradtional-40

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
# Extensions
*.class
*.swp

# Paths
.idea
cbin
dbtoaster
eclipse
resources
experiments
storm-0*
apache-storm-*
test/squall_plan_runner/confs/special_purpose
contrib/0.2.5

test/m_bucket
test/data/tpch/small
test/data/tpch/0.1G
test/data/tpch/0.01G_z1
test/data/tpch/0.01G_z2
test/data/tpch/0.01G_z3
test/data/tpch/0.01G_z4
test/data/tpch/0.05G
test/data/tpch/1G
test/data/tpch/4G
test/data/tpch/10G
test/data/tpch/50G
test/results/tpch/10G
test/results/tpch/50G

# sbt
target/
cbin
dbtoaster



================================================
FILE: .travis.yml
================================================
language: scala

scala:
   - 2.11.6
   
before_script:
  - sudo chmod +x /usr/local/bin/sbt


================================================
FILE: LICENSE
================================================

                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright [yyyy] [name of copyright owner]

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

================================================
FILE: NOTICE
================================================
EPFLDATA/Squall
Copyright 2011-2015 The Squall Collaboration:
-- the EPFL DATA Laboratory (http://data.epfl.ch) and
-- students of the 2014 EPFL Big Data course:
  -- Daniel Espino (@akathorn)
  -- Michalis Zervos (@mzervos)
  -- Matthaios-Alexandros Olma (@amolma)
  -- Andriani Stylianou (@antrianis)

This product includes software developed by ...

(See the contrib folder)



================================================
FILE: README.markdown
================================================

<!-- <p> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        <img style="float: center" align="middle" src="https://raw.githubusercontent.com/epfldata/squall/master/logo/logo.jpg"> </p> -->


# Squall 
[![Build Status](https://travis-ci.org/epfldata/squall.svg?branch=master)](https://travis-ci.org/epfldata/squall)

Squall is an online query processing engine built on top of [Storm](https://storm.apache.org/). Similar to how Hive provides SQL syntax on top of Hadoop for doing batch processing, Squall executes SQL queries on top of Storm for doing online processing. Squall supports a wide class of SQL analytics ranging from simple aggregations to more advanced UDF join predicates and adaptive rebalancing of load. It is being actively developed by several contributors from the [EPFL DATA](http://data.epfl.ch/) lab. Squall is undergoing a continuous process of development, currently it supports the following:

- [x] SQL (Select-Project-Join) query processing over continuous streams of data.
- [x] Full fledged & full-history stateful computation essential for approximate query processing, e.g. [Online Aggregation](http://en.wikipedia.org/wiki/Online_aggregation).
- [x] Time based Window Semantics for infinite data streams, e.g., sliding window, tumbling window, and landmark window semantics.
- [x] Theta Joins: arbitrary complex join predicates, including inequality, band, and arbitrary UDF join predicates. This gives a more comprehensive support and flexibility to data analytics. For example, [Hive plans](https://cwiki.apache.org/confluence/display/Hive/Theta+Join) to support theta joins in response to user requests.
- [x] Usability: Squall exposes three interfaces for programming. A **SQL** interface that directly translates a sql query to a running topology, a **functional** interface that leverages the syntactic sugar of Scala, and an **imperative** interface that exposes additional control on toplogy design.
- [x] Out-of-Core Processing: Can operate efficiently under limited memory resources through efficient disk based datastructures and indexes.
- [x] Throughput rates of up to Millions of tuples/second and latencies of milliseconds measured on a 5-machine cluster. Scalable to large cluster settings.
- [x] Guarantees: At least-once or at most-once semantics. No support for exactly-once semantics yet, however it is planned for.
- [ ] Elasticity: Scaling out according to the load.
- [ ] DashBoard: Integrating support for real time visualizations.
- [ ] Continuous load balance and adaptation to data skew.

### Example:
Consider the following SQL query:
```sql
SELECT C_MKTSEGMENT, COUNT(O_ORDERKEY)
FROM CUSTOMER join ORDERS on C_CUSTKEY = O_CUSTKEY
GROUP BY C_MKTSEGMENT
```

We provide several interfaces for running this query:

#### Declarative
A Declarative interface that directly parses this SQL query and creates an efficient storm Topology. This module is equipped with a cost-based optimizer. An example of a query is (a directory with pre-bundled SQL queries is [here](https://github.com/epfldata/squall/tree/master/test/squall/sql_queries)): 
```sql
SELECT CUSTOMER.MKTSEGMENT, COUNT(ORDERS.ORDERKEY)
FROM CUSTOMER join ORDERS on CUSTOMER.CUSTKEY=ORDERS.CUSTKEY
GROUP BY CUSTOMER.MKTSEGMENT
```

#### Functional
A Functional Scala-interface that leverages the brevity, productivity, convenience, and syntactic sugar of functional programming. For example the previous query is represented ([full code](https://github.com/epfldata/squall/blob/master/squall-functional/src/main/scala/ch/epfl/data/squall/api/scala/queries/ScalaHyracksPlan.scala)) as follows: 
```scala
    val customers = Source[customer]("customer").map { t => Tuple2(t._1, t._7) }
    val orders = Source[orders]("orders").map { t => t._2 }
    val join = customers.join(orders)(k1=> k1._1)(k2 => k2) //key1=key2
    val agg = join.groupByKey(x => 1, k => k._1._2) //count and groupby
    agg.execute(conf)
```

#### Imperative
An Imperative Java-interface that facilitates design and construction of online distributed query plans. For example the previous query is represented ([full code](https://github.com/epfldata/squall/blob/master/squall-examples/squall-java-examples/src/ch/epfl/data/squall/examples/imperative/shj/HyracksPlan.java)) as follows:

```java
Component customer = new DataSourceComponent("customer", conf)
                            .add(new ProjectOperator(0, 6));
Component orders = new DataSourceComponent("orders", conf)
                            .add(new ProjectOperator(1));
// join on CUSTKEY (index 0 from each component)
Component custOrders = new EquiJoinComponent(customer, 0, orders, 0) 
                // group by MKTSEGMENT (index 1 on concatenation of fields: customer, orders)
                .add(new AggregateCountOperator(conf).setGroupByColumns(1)); 
```

Queries are mapped to operator trees in the spirit of the query plans
of relational database systems.
These are are in turn mapped to Storm workers. (There is a parallel
implementation of each operator, so in general an operator is processed
by multiple workers).
Some operations of relational algebra, such as selections and projections,
are quite simple, and assigning them to separate workers is inefficient.
Rather than requiring the predecessor operator to send its output over the
network to the workers implementing these simple operations,
the simple operations can be integrated into the predecessor operators
and postprocess the output there. This is typically also done in
classical relational database systems, but in a distributed environment,
the benefits are even greater.
In the Squall API, query plans are built bottom-up from 
operators (called components or super-operators)
such as data source scans and joins; 
these components can then be extended by postprocessing operators such as
projections.

#### Window Semantics Example
Squall also provides out-of-the-box functionality for window semantics. That is the user does not have to be concerned with internal details of assignining timestamps, data distribution and state maintenance and finally result consistency and correctness. Final results and aggregations are stored in key-value stores that expose window-identifiers and the corresponding timestamp ranges. The interface exposes the following semantics:

* Sliding Window Semantics:
```scala
    //Examples
    Agg.onWindow(20, 5) //Range 20 secs and slide every 5 seconds
    Join.onSlidingWindow(10) // Range 10 seconds and slide every 1 second
```

* Tumbling Window Semantics:
```scala
    //Examples
    Agg.onTumblingWindow(20) // Tumble aggregations every 20 seconds
``` 

* Landmark Window Semantics.

[Here](https://github.com/epfldata/squall/blob/master/squall-functional/src/main/scala/ch/epfl/data/squall/api/scala/queries/ScalaTPCH7Plan.scala) is an example of a fully running query with window semantics.

When running this example, the results, which are printed out, should look something similar to this:

```
GERMANY|FRANCE|1995, wid:1, Timestamp: [2016-06-30 19:24:38.853 , 2016-06-30 19:24:58.853]  = 23809.149
GERMANY|FRANCE|1995, wid:2, Timestamp: [2016-06-30 19:24:43.853 , 2016-06-30 19:25:03.853]  = 621159.4881999999
GERMANY|FRANCE|1995, wid:3, Timestamp: [2016-06-30 19:24:48.853 , 2016-06-30 19:25:08.853]  = 621159.4881999999
...
GERMANY|FRANCE|1996, wid:1, Timestamp: [2016-06-30 19:24:38.853 , 2016-06-30 19:24:58.853]  = 40579.659
GERMANY|FRANCE|1996, wid:2, Timestamp: [2016-06-30 19:24:43.853 , 2016-06-30 19:25:03.853]  = 379095.8854
GERMANY|FRANCE|1996, wid:3, Timestamp: [2016-06-30 19:24:48.853 , 2016-06-30 19:25:08.853]  = 379095.8854
```
Where the first, second and third columns refer to the group-key, window-id, and Timestamp Interval of each window-id respectively.



### Documentation
White paper is available [here](http://infoscience.epfl.ch/record/217286/files/paper.pdf). Detailed documentation can be found on the [Squall wiki](http://github.com/epfldata/squall/wiki).

### Contributing to Squall
We'd love to have your help in making Squall better. If you're interested, please communicate with us your suggestions and get your name to the [Contributors](https://github.com/epfldata/squall/wiki/Contributors) list.

### License
Squall is licensed under [Apache License v2.0](http://www.apache.org/licenses/LICENSE-2.0.html).


================================================
FILE: bin/install.sh
================================================
#!/bin/bash

. ./storm_env.sh

# The following is needed only if we use DBToaster operators
# On Linux machines, we need to install Scala (at least 2.10)
# wget http://www.scala-lang.org/files/archive/scala-2.10.4.deb
# sudo dpkg -i scala-2.10.4.deb
# sudo apt-get update
# sudo apt-get install scala

# Downloading Storm and putting it to the right place
echo "Downloading and extracting $STORMNAME ..."
wget http://mirror.easyname.ch/apache/storm/$STORMNAME/$STORMNAME.tar.gz
tar -xzf $STORMNAME.tar.gz
mv $STORMNAME ..
rm $STORMNAME.tar.gz

# Compiling Squall and generating dependencies 
echo "Compiling Squall and generating dependencies ..."
CURR_DIR=`pwd`
cd ..
sbt package
sbt assemblyPackageDependency
cd $CURR_DIR
# The following is used only for the Cluster Mode
cp ../squall-core/target/squall-dependencies-0.2.0.jar ../$STORMNAME/lib/


================================================
FILE: bin/recompile.sh
================================================
#!/bin/bash

cd ../

#sbt clean

# Generate squall-0.2.0.jar
sbt package

# Generate squall-dependencies-0.2.0.jar
#sbt assemblyPackageDependency

# Generate squall-standalone-0.2.0.jar
#sbt assembly


================================================
FILE: bin/squall_cluster.sh
================================================
#!/bin/bash
. ./storm_env.sh

printFormat (){
	echo "Format:     ./squall_cluster.sh MODE CONFIG_PATH"
	echo "             MODE: SQL (default) or PLAN_RUNNER"
}

# Check the number of arguments
if [[ $# -lt 1 || $# -gt 2 ]]; then
	echo "ERROR:: Improper number of arguments!"
	printFormat
	exit 1
fi

# Reading input paramters
MODE=$1
if [[ "$MODE" != "PLAN_RUNNER" && "$MODE" != "SQL" ]]; then
	MODE=SQL
else
   shift
fi

# Main class
if [ "$MODE" == "PLAN_RUNNER" ]; then
	MAIN_CLASS=ch.epfl.data.squall.main.Main
else
	MAIN_CLASS=ch.epfl.data.squall.api.sql.main.ParserMain
fi

# Set config file path and check if it exist
if [[ $# -lt 1 ]]; then
	echo "ERROR:: Missing configuration file path!"
	printFormat
	exit 1
fi
CONFIG_PATH=$1
if ! [ -f $CONFIG_PATH ]; then
	echo "ERROR:: File $CONFIG_PATH does not exist! Please specify a valid configuration file!"
	exit 1
fi

# Running
../$STORMNAME/bin/storm jar ../squall-core/target/squall-0.2.0.jar $MAIN_CLASS $CONFIG_PATH


================================================
FILE: bin/squall_local.sh
================================================
#!/bin/bash
. ./storm_env.sh

printFormat (){
	echo "Format:     ./squall_local.sh MODE CONFIG_PATH"
	echo "             MODE: SQL (default) or PLAN_RUNNER"
}

# Check the number of arguments
if [[ $# -lt 1 || $# -gt 2 ]]; then
	echo "ERROR:: Improper number of arguments!"
	printFormat
	exit 1
fi

# Reading input paramters
MODE=$1
if [[ "$MODE" != "PLAN_RUNNER" && "$MODE" != "SQL" ]]; then
	MODE=SQL	
else
   shift
fi

# Main class
if [ "$MODE" == "PLAN_RUNNER" ]; then
	MAIN_CLASS=ch.epfl.data.squall.main.Main
else
	MAIN_CLASS=ch.epfl.data.squall.api.sql.main.ParserMain
fi

# Set config file path and check if it exist
if [[ $# -lt 1 ]]; then
	echo "ERROR:: Missing configuration file path!"
	printFormat
	exit 1
fi
CONFIG_PATH=$1
if ! [ -f $CONFIG_PATH ]; then
	echo "ERROR:: File $CONFIG_PATH does not exist! Please specify a valid configuration file!"
	exit 1
fi

# Running
java -Xmx128m -cp ../squall-core/target/squall-0.2.0.jar:../squall-core/target/squall-dependencies-0.2.0.jar:../$STORMNAME/lib/* $MAIN_CLASS $CONFIG_PATH


================================================
FILE: bin/storm_env.sh
================================================
#!/bin/bash

#STORMNAME=storm-0.9.2-incubating
STORMNAME=apache-storm-0.9.4

# DBTOASTER installation folder. Only required if QueryPlan uses DBToasterJoinComponent
DBTOASTER_HOME=../target/dbtoaster
export DBTOASTER_HOME=$DBTOASTER_HOME


================================================
FILE: build.sbt
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

scalaVersion := "2.11.6"

lazy val tempInstallDbtoaster = taskKey[String]("Installs DBToaster in a temporal directory if necessary and returns the DBToaster home")

lazy val commonSettings = Seq(
  name := "squall",
  organization := "ch.epfl.data",
  version := "0.2.0",
  scalaVersion := "2.11.6",
  // Avoids having the scala version in the path to the jars
  crossPaths := false,
  // Options for assembling a single jar
  test in assembly := {},
  assemblyJarName in assembly := name.value + "-standalone-" + version.value + ".jar",
  assemblyJarName in assemblyPackageDependency := name.value + "-dependencies-" + version.value + ".jar",
  // TODO: this is very wrong, I'm taking the default strategy, and instead of
  // using MergeStrategy.deduplicate, I'm using MergeStrategy.first to fix the
  // conflicts
  assemblyMergeStrategy in assembly := {
        case x if Assembly.isConfigFile(x) =>
          MergeStrategy.concat
        case PathList(ps @ _*) if Assembly.isReadme(ps.last) || Assembly.isLicenseFile(ps.last) =>
          MergeStrategy.rename
        case PathList("META-INF", xs @ _*) =>
          (xs map {_.toLowerCase}) match {
            case ("manifest.mf" :: Nil) | ("index.list" :: Nil) | ("dependencies" :: Nil) =>
              MergeStrategy.discard
            case ps @ (x :: xs) if ps.last.endsWith(".sf") || ps.last.endsWith(".dsa") =>
              MergeStrategy.discard
            case "plexus" :: xs =>
              MergeStrategy.discard
            case "services" :: xs =>
              MergeStrategy.filterDistinctLines
            case ("spring.schemas" :: Nil) | ("spring.handlers" :: Nil) =>
              MergeStrategy.filterDistinctLines
            case _ => MergeStrategy.first
          }
        case _ => MergeStrategy.first
      }
)

lazy val SqlTest = config("sql") extend(Test)
lazy val DbtoasterTest = config("dbtoaster") extend(Test)

def sqlFilter(name: String): Boolean = (name startsWith "ch.epfl.data.squall.test.sql")
def dbtoasterFilter(name: String): Boolean = (name startsWith "ch.epfl.data.squall.test.dbtoaster")
def planFilter(name: String): Boolean = !dbtoasterFilter(name) && !sqlFilter(name)

lazy val squall = (project in file("squall-core")).
  configs(SqlTest).
  configs(DbtoasterTest).
  settings(commonSettings: _*).
  settings(inConfig(SqlTest)(Defaults.testTasks): _*).
  settings(inConfig(DbtoasterTest)(Defaults.testTasks): _*).
  settings(
    mainClass := Some("ch.epfl.data.squall.main.Main"),
    unmanagedSourceDirectories in Compile += baseDirectory.value / "../squall-examples/squall-java-examples/src/",
    // Don't use scala as a dependency
    //autoScalaLibrary := false,
    // Set the external library directories to ./contrib
    unmanagedBase := baseDirectory.value / "../contrib",
    // We need to add Clojars as a resolver, as Storm depends on some
    // libraries from there.
    resolvers += "clojars" at "https://clojars.org/repo",
    libraryDependencies ++= Seq(
      // Versions that were changed when migrating from Lein to sbt are
      // commented just before the library
      "net.sf.jsqlparser" % "jsqlparser" % "0.7.0",
      "net.sf.trove4j" % "trove4j" % "3.0.2",
      "net.sf.opencsv" % "opencsv" % "2.3",
      // bdb-je: 5.0.84 -> 5.0.73
      //"com.sleepycat" % "je" % "5.0.73",
      // storm-core: 0.9.2-incubating -> 0.9.4
      "org.apache.storm" % "storm-core" % "0.9.4" % "provided",
      "org.slf4j" % "log4j-over-slf4j" % "1.7.12",
      //"io.dropwizard" % "dropwizard-metrics" % "0.8.1",
      //"org.apache.storm" % "storm-starter" % "0.9.4",
      "junit" % "junit" % "4.12" % Test,
      "com.novocode" % "junit-interface" % "0.11" % Test,
      "org.apache.hadoop" % "hadoop-client" % "2.2.0" exclude("org.slf4j", "slf4j-log4j12"),
      "org.apache.hadoop" % "hadoop-hdfs" % "2.2.0" exclude("org.slf4j", "slf4j-log4j12"),
      "org.apache.storm" % "storm-hdfs" % "0.10.0-beta1",
      "com.lambdaworks" % "lettuce" % "2.3.3"
        //"com.github.ptgoetz" % "storm-signals" % "0.2.0",
        //"com.netflix.curator" % "curator-framework" % "1.0.1"
    ),
    // http://www.scala-sbt.org/0.13/docs/Running-Project-Code.html
    // We need to fork the JVM, as storm uses multiple threads
    fork := true,

    // Testing
    libraryDependencies +=  "org.scalatest" % "scalatest_2.11" % "2.2.4" % Test,
    testOptions in Test := Seq(Tests.Filter(planFilter)),
    testOptions in SqlTest := Seq(Tests.Filter(sqlFilter)),
    testOptions in DbtoasterTest := Seq(Tests.Filter(dbtoasterFilter)),

    tempInstallDbtoaster := {
      if (System.getenv("DBTOASTER_HOME") != null && System.getenv("DBTOASTER_HOME") != "") {
        println("Using DBToaster at " + System.getenv("DBTOASTER_HOME"))
        System.getenv("DBTOASTER_HOME")
      } else {
        // Adapted from Khue bash script
        import scala.sys.process._

        val installDir = (target / "dbtoaster").value
        val packagePath = (unmanagedBase / "dbtoaster/dbtoaster-alpha5-release.tar.gz").value

        val OS = System.getProperty("os.name", "generic").toLowerCase();
        val frontendPath = if ((OS.indexOf("mac") >= 0) || (OS.indexOf("darwin") >= 0)) {
          (unmanagedBase / "dbtoaster/front_ends/dbtoaster_frontend_macosx").value
        } else if (OS.indexOf("nux") >= 0) {
          if (System.getProperty("sun.arch.data.model") == 64) {
            (unmanagedBase / "dbtoaster/front_ends/dbtoaster_frontend_linux_x86-64").value
          } else {
            (unmanagedBase / "dbtoaster/front_ends/dbtoaster_frontend_linux_x86-32").value
          }
        } else {
          throw new Exception("This platform is not supported for DBToaster")
        }

        println("Installing DBToaster to " + installDir)
        s"mkdir -p $installDir".!
        println(s"Extracting $packagePath to $installDir")
        s"tar -xzf $packagePath -C $installDir --strip-components=1".!
        s"chmod +x ${installDir}/bin/dbtoaster".!
        println(s"Select frontend binary $frontendPath")
        println(s"copy $frontendPath to $installDir/bin/dbtoaster_frontend")
        s"cp $frontendPath $installDir/bin/dbtoaster_frontend".!

        installDir.getAbsolutePath()
      }
    },


    envVars in DbtoasterTest := Map("DBTOASTER_HOME" -> tempInstallDbtoaster.value),
    cleanFiles <+= target / "dbtoaster"
  )


// For the macros
lazy val functional_macros = (project in file("squall-functional")).
  dependsOn(squall).
  settings(commonSettings: _*).
  settings(
    name := "squall-frontend-macros",
    libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-reflect" % _),
    scalaSource in Compile := baseDirectory.value / "macros",
    target := target.value / "macros"
  )


// Temporal directory for REPL output
// TODO: this should probably be a task
lazy val repl_outdir   = sbt.IO.createTemporaryDirectory
lazy val repl_classdir = {sbt.IO.createDirectory(repl_outdir / "classes"); repl_outdir / "classes"}

lazy val functional = (project in file("squall-functional")).
  dependsOn(squall, functional_macros).
  settings(commonSettings: _*).
  settings(
//    fork := true,
    // TODO: this is only necessary because we are using the .jar for testing
    (test in Test) := {
      (Keys.`package` in Compile).value
        (test in Test).value
    },
    name := "squall-frontend",
    libraryDependencies += "org.apache.storm" % "storm-core" % "0.9.4" % "provided",
    libraryDependencies <+= (scalaVersion)("org.scala-lang" % "scala-reflect" % _),
    libraryDependencies +=  "org.scalatest" % "scalatest_2.11" % "2.2.4" % Test,
    // Interactive mode
    // TODO: this should probably be a task
    scalacOptions in (Compile, console) += "-Yrepl-sync",
    scalacOptions in (Compile, console) += "-Yrepl-class-based",
    scalacOptions in (Compile, console) += "-Yrepl-outdir",
    scalacOptions in (Compile, console) += repl_classdir.getAbsolutePath(),
    initialCommands in Compile in console += "import ch.epfl.data.squall.query_plans.QueryBuilder;",
    initialCommands in Compile in console += "import ch.epfl.data.squall.api.scala.SquallType._;",
    initialCommands in Compile in console += "import ch.epfl.data.squall.api.scala.Stream._;",
    initialCommands in Compile in console += "import ch.epfl.data.squall.api.scala.TPCHSchema._;",
    initialCommands in Compile in console += s"""val REPL = new ch.epfl.data.squall.api.scala.REPL(\"${repl_outdir}\");""",
    initialCommands in Compile in console += "import REPL._;",
    initialCommands in Compile in console += "start;",
    cleanupCommands in Compile in console += "ch.epfl.data.squall.utilities.StormWrapper.shutdown();",
    cleanupCommands in Compile in console += "println(\"Shutting down...\");",
    console in Compile <<= (console in Compile).dependsOn(assembly)
  )



================================================
FILE: project/build.properties
================================================
sbt.version=0.13.8


================================================
FILE: project/plugins.sbt
================================================
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.13.0")


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/ConfigSelectivityEstimator.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.estimators;

import java.util.Map;

import ch.epfl.data.squall.utilities.SystemParameters;

public class ConfigSelectivityEstimator {

    private final Map _map;

    public ConfigSelectivityEstimator(Map map) {
	_map = map;
    }

    /*
     * read selectivity from the config file
     */
    public double estimate(String compName) {
	final String selStr = compName + "_SEL";
	return SystemParameters.getDouble(_map, selStr);
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/HardCodedSelectivities.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.estimators;

import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.operators.relational.LikeExpression;
import net.sf.jsqlparser.expression.operators.relational.MinorThan;
import net.sf.jsqlparser.schema.Column;

public class HardCodedSelectivities {

    private static String createErrorMessage(String queryName, Expression expr) {
	return "The optimizer cannot compute the selectivity of Expression "
		+ expr.toString()
		+ " in query "
		+ queryName
		+ ". Try to manually add these information to class HardCodedSelectivities.";
    }

    public static double estimate(String queryName, Expression expr) {
	double selectivity = INVALID_SELECTIVITY;
	if (expr instanceof LikeExpression)
	    selectivity = estimate(queryName, (LikeExpression) expr);
	else if (expr instanceof MinorThan)
	    selectivity = estimate(queryName, (MinorThan) expr);

	if (selectivity != INVALID_SELECTIVITY)
	    return selectivity;
	else {
	    final String msg = createErrorMessage(queryName, expr);
	    throw new RuntimeException(msg);
	}
    }

    private static double estimate(String queryName, LikeExpression like) {
	if (queryName.equalsIgnoreCase("TPCH9"))
	    return 0.052;

	// any other case is not yet supported
	return INVALID_SELECTIVITY;
    }

    // no constants on both sides; columns within a single table are compared
    private static double estimate(String queryName, MinorThan mt) {
	final Expression leftExp = mt.getLeftExpression();
	final Expression rightExp = mt.getRightExpression();

	if (leftExp instanceof Column && rightExp instanceof Column) {
	    final String rightname = ((Column) rightExp).getColumnName();
	    final String leftname = ((Column) leftExp).getColumnName();
	    if (queryName.equalsIgnoreCase("TPCH4")
		    || queryName.equalsIgnoreCase("TPCH12"))
		if (rightname.equals("RECEIPTDATE")
			&& leftname.equals("COMMITDATE"))
		    return 0.62;
	    if (queryName.equalsIgnoreCase("TPCH12"))
		if (rightname.equals("COMMITDATE")
			&& leftname.equals("SHIPDATE"))
		    return 0.50;
	}

	// any other case is not yet supported
	return INVALID_SELECTIVITY;
    }

    private static final double INVALID_SELECTIVITY = -1;
}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/JSQLTypeConverter.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.estimators;

import net.sf.jsqlparser.expression.AllComparisonExpression;
import net.sf.jsqlparser.expression.AnyComparisonExpression;
import net.sf.jsqlparser.expression.CaseExpression;
import net.sf.jsqlparser.expression.DateValue;
import net.sf.jsqlparser.expression.DoubleValue;
import net.sf.jsqlparser.expression.ExpressionVisitor;
import net.sf.jsqlparser.expression.Function;
import net.sf.jsqlparser.expression.InverseExpression;
import net.sf.jsqlparser.expression.JdbcParameter;
import net.sf.jsqlparser.expression.LongValue;
import net.sf.jsqlparser.expression.NullValue;
import net.sf.jsqlparser.expression.Parenthesis;
import net.sf.jsqlparser.expression.StringValue;
import net.sf.jsqlparser.expression.TimeValue;
import net.sf.jsqlparser.expression.TimestampValue;
import net.sf.jsqlparser.expression.WhenClause;
import net.sf.jsqlparser.expression.operators.arithmetic.Addition;
import net.sf.jsqlparser.expression.operators.arithmetic.BitwiseAnd;
import net.sf.jsqlparser.expression.operators.arithmetic.BitwiseOr;
import net.sf.jsqlparser.expression.operators.arithmetic.BitwiseXor;
import net.sf.jsqlparser.expression.operators.arithmetic.Concat;
import net.sf.jsqlparser.expression.operators.arithmetic.Division;
import net.sf.jsqlparser.expression.operators.arithmetic.Multiplication;
import net.sf.jsqlparser.expression.operators.arithmetic.Subtraction;
import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
import net.sf.jsqlparser.expression.operators.relational.Between;
import net.sf.jsqlparser.expression.operators.relational.EqualsTo;
import net.sf.jsqlparser.expression.operators.relational.ExistsExpression;
import net.sf.jsqlparser.expression.operators.relational.GreaterThan;
import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals;
import net.sf.jsqlparser.expression.operators.relational.InExpression;
import net.sf.jsqlparser.expression.operators.relational.IsNullExpression;
import net.sf.jsqlparser.expression.operators.relational.LikeExpression;
import net.sf.jsqlparser.expression.operators.relational.Matches;
import net.sf.jsqlparser.expression.operators.relational.MinorThan;
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo;
import net.sf.jsqlparser.schema.Column;
import net.sf.jsqlparser.statement.select.SubSelect;

/*
 * this class extracts Java types objects out of JSQL wrapper objects
 */
public class JSQLTypeConverter implements ExpressionVisitor {

    private Object _result;

    public Object getResult() {
	return _result;
    }

    @Override
    public void visit(Addition adtn) {

    }

    @Override
    public void visit(AllComparisonExpression ace) {

    }

    @Override
    public void visit(AndExpression ae) {

    }

    @Override
    public void visit(AnyComparisonExpression ace) {

    }

    @Override
    public void visit(Between btwn) {

    }

    @Override
    public void visit(BitwiseAnd ba) {

    }

    @Override
    public void visit(BitwiseOr bo) {

    }

    @Override
    public void visit(BitwiseXor bx) {

    }

    @Override
    public void visit(CaseExpression ce) {

    }

    @Override
    public void visit(Column column) {

    }

    @Override
    public void visit(Concat concat) {

    }

    @Override
    public void visit(DateValue dv) {
	_result = dv.getValue();
    }

    @Override
    public void visit(Division dvsn) {

    }

    @Override
    public void visit(DoubleValue dv) {
	_result = dv.getValue();
    }

    @Override
    public void visit(EqualsTo et) {

    }

    @Override
    public void visit(ExistsExpression ee) {

    }

    @Override
    public void visit(Function fnctn) {

    }

    @Override
    public void visit(GreaterThan gt) {

    }

    @Override
    public void visit(GreaterThanEquals gte) {

    }

    @Override
    public void visit(InExpression ie) {

    }

    @Override
    public void visit(InverseExpression ie) {

    }

    @Override
    public void visit(IsNullExpression ine) {

    }

    @Override
    public void visit(JdbcParameter jp) {

    }

    @Override
    public void visit(LikeExpression le) {

    }

    @Override
    public void visit(LongValue lv) {
	_result = lv.getValue();
    }

    @Override
    public void visit(Matches mtchs) {

    }

    @Override
    public void visit(MinorThan mt) {

    }

    @Override
    public void visit(MinorThanEquals mte) {

    }

    @Override
    public void visit(Multiplication m) {

    }

    @Override
    public void visit(NotEqualsTo net) {

    }

    // any of these keeps _result = null
    @Override
    public void visit(NullValue nv) {

    }

    @Override
    public void visit(OrExpression oe) {

    }

    @Override
    public void visit(Parenthesis prnths) {

    }

    @Override
    public void visit(StringValue sv) {
	_result = sv.getValue();
    }

    @Override
    public void visit(SubSelect ss) {

    }

    @Override
    public void visit(Subtraction s) {

    }

    @Override
    public void visit(TimestampValue tv) {

    }

    @Override
    public void visit(TimeValue tv) {

    }

    @Override
    public void visit(WhenClause wc) {

    }
}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/SelectivityEstimator.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.estimators;

import net.sf.jsqlparser.expression.Expression;

public interface SelectivityEstimator {

    public double estimate(Expression expr);

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/SelingerSelectivityEstimator.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.estimators;

import java.util.List;

import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.Parenthesis;
import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
import net.sf.jsqlparser.expression.operators.relational.EqualsTo;
import net.sf.jsqlparser.expression.operators.relational.GreaterThan;
import net.sf.jsqlparser.expression.operators.relational.GreaterThanEquals;
import net.sf.jsqlparser.expression.operators.relational.MinorThan;
import net.sf.jsqlparser.expression.operators.relational.MinorThanEquals;
import net.sf.jsqlparser.expression.operators.relational.NotEqualsTo;
import net.sf.jsqlparser.schema.Column;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.util.TableAliasName;
import ch.epfl.data.squall.types.DoubleType;
import ch.epfl.data.squall.types.LongType;
import ch.epfl.data.squall.types.Type;

/* TODO high prio:
 * no matter on which component we do invoke, the only important is to know previous projections
 *   (TPCH7, 8 with pushing OR from WHERE clause)
 *
 * TODO low prio: ERROR MESSAGE
 * do not support R.A + 4 < 2, we will need ValueExpression with ranges to support that, and a user can rewrite it itself
 * do not support R.A + R.B = 2 (no exception)
 *   if there are multiple fields addressed, they have probably some dependency, which we don't model yet
 */
public class SelingerSelectivityEstimator implements SelectivityEstimator {

    private final String _queryName;
    private final Schema _schema;
    private final TableAliasName _tan;

    public SelingerSelectivityEstimator(String queryName, Schema schema,
	    TableAliasName tan) {
	_queryName = queryName;
	_schema = schema;
	_tan = tan;
    }

    private Long doubleToLong(Double doubleValue) {
	final Long result = doubleValue.longValue();
	if (result.doubleValue() != doubleValue)
	    throw new RuntimeException(
		    "Rounding error! Check your schema file.");
	return result;
    }

    public double estimate(AndExpression and) {
	// the case when we have the same single column on both sides
	final Expression leftExpr = and.getLeftExpression();
	final List<Column> leftColumns = ParserUtil.getJSQLColumns(leftExpr);
	final Column leftColumn = leftColumns.get(0);

	final Expression rightExpr = and.getRightExpression();
	final List<Column> rightColumns = ParserUtil.getJSQLColumns(rightExpr);
	final Column rightColumn = rightColumns.get(0);

	if (leftColumn.toString().equals(rightColumn.toString()))
	    // not using leftExpr and rightExpr, because we want to preserve
	    // type
	    return 1 - (1 - estimate(and.getLeftExpression()))
		    - (1 - estimate(and.getRightExpression()));
	else
	    return estimate(and.getLeftExpression())
		    * estimate(and.getRightExpression());

    }

    public double estimate(EqualsTo equals) {
	final List<Column> columns = ParserUtil.getJSQLColumns(equals);

	final Column column = columns.get(0);
	final String fullSchemaColumnName = _tan
		.getFullSchemaColumnName(column);

	final long distinctValues = _schema
		.getNumDistinctValues(fullSchemaColumnName);
	return 1.0 / distinctValues;
    }

    @Override
    public double estimate(Expression expr) {
	// similarly to JSQLTypeConvertor, it can be done via visitor pattern,
	// but then it cannot implement SelectivityEstimator anymore.
	// the gap between void of visit method and double as the result here
	// can be solved in a similar manner as in JSQLTypeConverter.
	if (expr instanceof EqualsTo)
	    return estimate((EqualsTo) expr);
	else if (expr instanceof NotEqualsTo)
	    return estimate((NotEqualsTo) expr);
	else if (expr instanceof MinorThan)
	    return estimate((MinorThan) expr);
	else if (expr instanceof MinorThanEquals)
	    return estimate((MinorThanEquals) expr);
	else if (expr instanceof GreaterThan)
	    return estimate((GreaterThan) expr);
	else if (expr instanceof GreaterThanEquals)
	    return estimate((GreaterThanEquals) expr);
	else if (expr instanceof AndExpression)
	    return estimate((AndExpression) expr);
	else if (expr instanceof OrExpression)
	    return estimate((OrExpression) expr);
	else if (expr instanceof Parenthesis) {
	    final Parenthesis pnths = (Parenthesis) expr;
	    return estimate(pnths.getExpression());
	} else
	    return HardCodedSelectivities.estimate(_queryName, expr);
    }

    public double estimate(GreaterThan gt) {
	final EqualsTo equals = new EqualsTo();
	equals.setLeftExpression(gt.getLeftExpression());
	equals.setRightExpression(gt.getRightExpression());

	final MinorThan minorThan = new MinorThan();
	minorThan.setLeftExpression(gt.getLeftExpression());
	minorThan.setRightExpression(gt.getRightExpression());

	return 1 - estimate(equals) - estimate(minorThan);
    }

    public double estimate(GreaterThanEquals gt) {
	final MinorThan minorThan = new MinorThan();
	minorThan.setLeftExpression(gt.getLeftExpression());
	minorThan.setRightExpression(gt.getRightExpression());

	return 1 - estimate(minorThan);
    }

    public double estimate(List<Expression> exprs) {
	// this is treated as a list of AndExpressions
	if (exprs.size() == 1)
	    return estimate(exprs.get(0));

	// at least two expressions in the list
	AndExpression and = new AndExpression(exprs.get(0), exprs.get(1));
	for (int i = 2; i < exprs.size(); i++)
	    and = new AndExpression(and, exprs.get(i));
	return estimate(and);
    }

    public double estimate(MinorThan mt) {
	final List<Column> columns = ParserUtil.getJSQLColumns(mt);
	final Column column = columns.get(0);
	final Type tc = _schema.getType(ParserUtil.getFullSchemaColumnName(
		column, _tan));

	// TODO: assume uniform distribution
	final String fullSchemaColumnName = _tan
		.getFullSchemaColumnName(column);
	Object minValue = _schema.getRange(fullSchemaColumnName).getMin();
	Object maxValue = _schema.getRange(fullSchemaColumnName).getMax();

	// We have to compare the same types
	if (tc instanceof DoubleType) {
	    if (minValue instanceof Long)
		minValue = longToDouble((Long) minValue);
	    if (maxValue instanceof Long)
		maxValue = longToDouble((Long) maxValue);
	} else if (tc instanceof LongType) {
	    if (minValue instanceof Double)
		minValue = doubleToLong((Double) minValue);
	    if (maxValue instanceof Double)
		maxValue = doubleToLong((Double) maxValue);
	}

	final double fullRange = tc.getDistance(maxValue, minValue);
	final Expression leftExp = mt.getLeftExpression();
	final Expression rightExp = mt.getRightExpression();

	Object conditionConstant = findConditionConstant(rightExp);
	if (conditionConstant == null)
	    // maybe the constant is on the left side
	    conditionConstant = findConditionConstant(leftExp);

	if (conditionConstant != null) {
	    // a constant on one side
	    // MAKE TPCH-6 WORK WITH NCL OPTIMIZER
	    if (tc instanceof DoubleType) {
		if (conditionConstant instanceof Long)
		    conditionConstant = longToDouble((Long) conditionConstant);
	    } else if (tc instanceof LongType)
		if (conditionConstant instanceof Double)
		    conditionConstant = doubleToLong((Double) conditionConstant);
	    final double distance = tc.getDistance(conditionConstant, minValue);
	    return distance / fullRange;
	} else
	    // no constants on both sides; columns within a single table are
	    // compared
	    return HardCodedSelectivities.estimate(_queryName, mt);
    }

    public double estimate(MinorThanEquals mte) {
	final EqualsTo equals = new EqualsTo();
	equals.setLeftExpression(mte.getLeftExpression());
	equals.setRightExpression(mte.getRightExpression());

	final MinorThan minorThan = new MinorThan();
	minorThan.setLeftExpression(mte.getLeftExpression());
	minorThan.setRightExpression(mte.getRightExpression());

	return estimate(minorThan) + estimate(equals);
    }

    /*
     * computed using the basic ones (= and <)
     */
    public double estimate(NotEqualsTo ne) {
	final EqualsTo equals = new EqualsTo();
	equals.setLeftExpression(ne.getLeftExpression());
	equals.setRightExpression(ne.getRightExpression());

	return 1 - estimate(equals);
    }

    /*
     * And, Or expressions
     */
    public double estimate(OrExpression or) {
	return estimate(or.getLeftExpression())
		+ estimate(or.getRightExpression());
    }

    /*
     * WHERE R.A < 4, or WHERE 4 < R.A, This method returns 4.
     */
    private Object findConditionConstant(Expression exp) {
	final JSQLTypeConverter converter = new JSQLTypeConverter();
	exp.accept(converter);
	final Object currentValue = converter.getResult();
	return currentValue;
    }

    private Double longToDouble(Long longValue) {
	return longValue.doubleValue();
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/main/ParserMain.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.main;

import java.util.Map;

import org.apache.log4j.Logger;

import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.optimizers.index.IndexRuleOptimizer;
import ch.epfl.data.squall.api.sql.optimizers.index.IndexSimpleOptimizer;
import ch.epfl.data.squall.api.sql.optimizers.name.NameCostOptimizer;
import ch.epfl.data.squall.api.sql.optimizers.name.NameManualOptimizer;
import ch.epfl.data.squall.api.sql.optimizers.name.NameManualParOptimizer;
import ch.epfl.data.squall.api.sql.optimizers.name.NameRuleOptimizer;
import ch.epfl.data.squall.api.sql.optimizers.name.manual_batching.ManualBatchingOptimizer;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.main.Main;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

public class ParserMain {
    public static void main(String[] args) {
	final String parserConfPath = args[0];
	final ParserMain pm = new ParserMain();

	Map map = pm.createConfig(parserConfPath);
	// map has to filled before plan is created
	final QueryBuilder plan = pm.generatePlan(map);
	// we have to set ackers after we know how many workers are there(which
	// is done in generatePlan)
	map = pm.putAckers(plan, map);

	LOG.info(ParserUtil.toString(plan));
	LOG.info(ParserUtil.parToString(plan, map));

	new Main(plan, map, parserConfPath);
    }

    private static Logger LOG = Logger.getLogger(ParserMain.class);

    // String[] sizes: {"1G", "2G", "4G", ...}
    public Map createConfig(String parserConfPath) {
	final Map map = SystemParameters.fileToMap(parserConfPath);

	final String dbSize = SystemParameters.getString(map, "DIP_DB_SIZE")
		+ "G";
	final String dataRoot = SystemParameters
		.getString(map, "DIP_DATA_ROOT");
	final String dataPath = dataRoot + "/" + dbSize + "/";

	SystemParameters.putInMap(map, "DIP_DATA_PATH", dataPath);

	return map;
    }

    public QueryBuilder generatePlan(Map map) {
	final Optimizer opt = pickOptimizer(map);
	return opt.generate();
    }

    private Optimizer pickOptimizer(Map map) {
	final String optStr = SystemParameters.getString(map,
		"DIP_OPTIMIZER_TYPE");
	LOG.info("Selected optimizer: " + optStr);
	if ("INDEX_SIMPLE".equalsIgnoreCase(optStr))
	    // Simple optimizer provides lefty plans
	    return new IndexSimpleOptimizer(map);
	else if ("INDEX_RULE_BUSHY".equalsIgnoreCase(optStr))
	    return new IndexRuleOptimizer(map);
	else if ("NAME_MANUAL_PAR_LEFTY".equalsIgnoreCase(optStr))
	    return new NameManualParOptimizer(map);
	else if ("NAME_MANUAL_COST_LEFTY".equalsIgnoreCase(optStr))
	    return new NameManualOptimizer(map);
	else if ("NAME_RULE_LEFTY".equalsIgnoreCase(optStr))
	    return new NameRuleOptimizer(map);
	else if ("NAME_COST_LEFTY".equalsIgnoreCase(optStr))
	    return new NameCostOptimizer(map);
	else if ("NAME_MANUAL_BATCHING".equalsIgnoreCase(optStr))
	    return new ManualBatchingOptimizer(map);
	throw new RuntimeException("Unknown " + optStr + " optimizer!");
    }

    public Map putAckers(QueryBuilder plan, Map map) {
	final int numWorkers = ParserUtil.getTotalParallelism(plan, map);
	int localAckers, clusterAckers;

	if (!SystemParameters.getBoolean(map, "DIP_ACK_EVERY_TUPLE")) {
	    // we don't ack after each tuple is sent,
	    // so we don't need any node to be dedicated for acking
	    localAckers = 0;
	    clusterAckers = 0;
	} else {
	    // on local machine we always set it to 1, because there is no so
	    // many cores
	    localAckers = 1;

	    // this is a heuristic which could be changed
	    clusterAckers = numWorkers / 2;
	}

	if (SystemParameters.getBoolean(map, "DIP_DISTRIBUTED")) {
	    SystemParameters.putInMap(map, "DIP_NUM_ACKERS", clusterAckers);
	    if (numWorkers + clusterAckers > SystemParameters.CLUSTER_SIZE)
		throw new RuntimeException("The cluster has only "
			+ SystemParameters.CLUSTER_SIZE
			+ " nodes, but the query plan requires " + numWorkers
			+ " workers " + clusterAckers + " ackers.");
	} else
	    SystemParameters.putInMap(map, "DIP_NUM_ACKERS", localAckers);

	return map;
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/CompGen.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers;

import java.util.List;

import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.query_plans.QueryBuilder;

public interface CompGen {

    /*
     * adding a DataSourceComponent to the list of components Necessary to call
     * only when only one table is addresses in WHERE clause of a SQL query
     */
    public DataSourceComponent generateDataSource(String tableCompName);

    /*
     * Join between two components
     */
    public Component generateEquiJoin(Component left, Component right);

    public QueryBuilder getQueryBuilder();

    public List<Component> getSubPlans();

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/Optimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers;

import ch.epfl.data.squall.query_plans.QueryBuilder;

public interface Optimizer {

    public QueryBuilder generate();

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/CompLevel.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

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

public class CompLevel implements Comparable<CompLevel> {
    private final Component _comp;
    private int _level;

    public CompLevel(Component comp, int level) {
	_comp = comp;
	_level = level;
    }

    @Override
    public int compareTo(CompLevel cl) {
	final int otherLevel = cl.getLevel();
	return (new Integer(_level)).compareTo(new Integer(otherLevel));
    }

    public Component getComponent() {
	return _comp;
    }

    public int getLevel() {
	return _level;
    }

    public void setLevel(int level) {
	_level = level;
    }
}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/EarlyProjection.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;

import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.util.TableAliasName;
import ch.epfl.data.squall.api.sql.visitors.squall.VECollectVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.expressions.ColumnReference;
import ch.epfl.data.squall.expressions.ValueExpression;
import ch.epfl.data.squall.operators.AggregateOperator;
import ch.epfl.data.squall.operators.ProjectOperator;
import ch.epfl.data.squall.query_plans.QueryBuilder;

/*
 * Eliminating unncessary indexes - applying projections wherever possible.
 * Has two phases - bottom up (informing what child need)
 *                - top down (parent says what it has to send)
 * Note that parent has to send something which no descendant need (in order to perfrorm B):
 *                - Selection (A)
 *                - Projection
 *                - Aggregation, groupByColumns, HashIndexes, HashColumns (B)
 * Distinct and Project are not supported to appear in ChainOperators before we introduce them.
 * It is assumed that whatever Projection sends, it will be seen by the next level component.
 */
public class EarlyProjection {
    private class CompPackage implements Comparable<CompPackage> {
	private final Component _component;
	private final int _level;
	private int _leftParentOutputSize;

	// just after bottomUp

	public CompPackage(Component component, int level) {
	    _component = component;
	    _level = level;

	    final Component[] parents = component.getParents();
	    if (parents != null) {
		final Component leftParent = parents[0];
		_leftParentOutputSize = ParserUtil.getPreOpsOutputSize(
			leftParent, _schema, _tan);
	    }
	}

	// descending order
	@Override
	public int compareTo(CompPackage cp) {
	    final int otherLevel = cp.getLevel();
	    return (new Integer(otherLevel)).compareTo(new Integer(_level));
	}

	public Component getComponent() {
	    return _component;
	}

	public int getLeftParentOutputSize() {
	    return _leftParentOutputSize;
	}

	public int getLevel() {
	    return _level;
	}
    }

    private final Schema _schema;

    private final TableAliasName _tan;
    private final List<CompPackage> _cpList = new ArrayList<CompPackage>();

    // could go into cpList, because we need to access it from parent, and we
    // don't have CompPackage parent property
    private final HashMap<Component, List<Integer>> _compOldProj = new HashMap<Component, List<Integer>>();

    EarlyProjection(Schema schema, TableAliasName tan) {
	_schema = schema;
	_tan = tan;
    }

    private List<Integer> addOffset(List<Integer> intList, int offset) {
	final List<Integer> result = new ArrayList<Integer>();
	for (int i = 0; i < intList.size(); i++) {
	    final int current = intList.get(i);
	    final int newValue = current + offset;
	    result.add(newValue);
	}
	return result;
    }

    private void addToLevelCollection(Component component, int level) {
	if (component.getParents() != null) {
	    final CompPackage cp = new CompPackage(component, level);
	    _cpList.add(cp);
	}
    }

    private List<Integer> arrivedFromParents(CompPackage cp) {
	final Component comp = cp.getComponent();
	final Component[] parents = comp.getParents();

	final List<Integer> fromParents = new ArrayList<Integer>();
	// at least one parent
	final Component leftParent = parents[0];
	fromParents.addAll(extractProjIndexesAfterBottomUp(leftParent));

	if (parents.length == 2) {
	    final Component rightParent = parents[1];
	    List<Integer> rightIndexes = extractProjIndexesAfterBottomUp(rightParent);

	    // take into account neglected hash from rhs
	    rightIndexes = filterHash(rightIndexes,
		    rightParent.getHashIndexes());

	    // fromParents contains leftParent, that's why we use its size as an
	    // offset
	    rightIndexes = addOffset(rightIndexes, cp.getLeftParentOutputSize());
	    fromParents.addAll(rightIndexes);
	}
	return fromParents;
    }

    private void bottomUp(Component component, List<Integer> inheritedUsed,
	    int level) {
	addToLevelCollection(component, level);

	final List<Integer> directlyUsedIndexes = new ArrayList<Integer>();
	directlyUsedIndexes.addAll(getDirectlyUsedIndexes(component));

	final List<ValueExpression> afterProjVE = getAfterProjVEs(component);
	final List<ValueExpression> allVE = getAllVEs(component);

	List<Integer> allUsedIndexes = new ArrayList<Integer>();
	allUsedIndexes.addAll(inheritedUsed);
	allUsedIndexes.addAll(directlyUsedIndexes);
	allUsedIndexes.addAll(ParserUtil.getColumnRefIndexes(ParserUtil
		.getColumnRefFromVEs(allVE)));
	allUsedIndexes = sortElimDuplicates(allUsedIndexes);

	List<Integer> afterProjIndexes = new ArrayList<Integer>();
	afterProjIndexes.addAll(inheritedUsed);
	afterProjIndexes.addAll(directlyUsedIndexes);
	final List<ColumnReference> afterProjColRefs = ParserUtil
		.getColumnRefFromVEs(afterProjVE);
	afterProjIndexes.addAll(ParserUtil
		.getColumnRefIndexes(afterProjColRefs));
	afterProjIndexes = sortElimDuplicates(afterProjIndexes);

	// set projection as if parent do not change
	final ProjectOperator projection = new ProjectOperator(
		ParserUtil.listToArr(afterProjIndexes));
	component.add(projection);

	// projection changed, everybody after it should notice that
	updateColumnRefs(afterProjColRefs, afterProjIndexes);
	updateIndexes(component, afterProjIndexes);

	// sending to parents
	final Component[] parents = component.getParents();
	if (parents != null) {
	    // left
	    final Component leftParent = parents[0];
	    final int leftParentSize = ParserUtil.getPreOpsOutputSize(
		    leftParent, _schema, _tan);
	    final List<Integer> leftSentUsedIndexes = filterLess(
		    allUsedIndexes, leftParentSize);
	    bottomUp(leftParent, leftSentUsedIndexes, level + 1);

	    // right
	    if (parents.length == 2) {
		final Component rightParent = parents[1];
		final List<Integer> rightUsedIndexes = filterEqualBigger(
			allUsedIndexes, leftParentSize);
		final List<Integer> rightSentUsedIndexes = createRightSendIndexes(
			rightUsedIndexes, rightParent, leftParentSize);
		bottomUp(rightParent, rightSentUsedIndexes, level + 1);
	    }
	}
    }

    private void bottomUp(QueryBuilder queryPlan) {
	final List<Integer> inheritedUsed = new ArrayList<Integer>();
	bottomUp(queryPlan.getLastComponent(), inheritedUsed, 0);
    }

    private List<Integer> createRightSendIndexes(
	    List<Integer> rightUsedIndexes, Component rightParent,
	    int leftParentSize) {
	final List<Integer> result = new ArrayList<Integer>();

	for (final Integer i : rightUsedIndexes) {
	    // first step is to normalize right indexes starting with 0
	    final int normalized = i - leftParentSize;
	    final int sent = positionListIngoreHash(normalized,
		    rightParent.getHashIndexes());
	    result.add(sent);
	}

	return result;
    }

    // elem must belong to intList
    private int elemsBefore(int elem, List<Integer> intList) {
	if (!intList.contains(elem))
	    throw new RuntimeException(
		    "Developer error. elemsBefore: no element.");
	return intList.indexOf(elem);
    }

    // update indexes so that they represent position in filteredIndexList.
    private List<Integer> elemsBefore(List<Integer> old,
	    List<Integer> filteredIndexList) {
	final List<Integer> result = new ArrayList<Integer>();
	for (final int i : old)
	    result.add(elemsBefore(i, filteredIndexList));
	return result;
    }

    private List<Integer> extractProjIndexesAfterBottomUp(Component comp) {
	if (comp.getParents() == null)
	    return ParserUtil.extractColumnIndexes(comp.getChainOperator()
		    .getProjection().getExpressions());
	else
	    return _compOldProj.get(comp);
    }

    private List<Integer> filterEqualBigger(List<Integer> indexes, int limit) {
	final List<Integer> result = new ArrayList<Integer>();
	for (final Integer index : indexes)
	    if (index >= limit)
		result.add(index);
	return result;
    }

    // if old is [0 1 5 10] and hash is [2], the result is [0 1 9]
    private List<Integer> filterHash(List<Integer> old, List<Integer> hashes) {
	final List<Integer> result = new ArrayList<Integer>();
	int hashesBefore = 0;
	for (int i = 0; i < old.size(); i++)
	    if (hashes.contains(i))
		hashesBefore++;
	    else {
		final int current = old.get(i);
		final int newValue = current - hashesBefore;
		result.add(newValue);
	    }
	return result;
    }

    private List<Integer> filterLess(List<Integer> indexes, int limit) {
	final List<Integer> result = new ArrayList<Integer>();
	for (final Integer index : indexes)
	    if (index < limit)
		result.add(index);
	return result;
    }

    private List<ValueExpression> getAfterProjVEs(Component component) {
	final VECollectVisitor veVisitor = new VECollectVisitor();
	veVisitor.visit(component);
	return veVisitor.getAfterProjExpressions();
    }

    private List<ValueExpression> getAllVEs(Component component) {
	final VECollectVisitor veVisitor = new VECollectVisitor();
	veVisitor.visit(component);
	return veVisitor.getAllExpressions();
    }

    private List<ValueExpression> getBeforeProjVEs(Component component) {
	final VECollectVisitor veVisitor = new VECollectVisitor();
	veVisitor.visit(component);
	return veVisitor.getBeforeProjExpressions();
    }

    // in this method, only plain indexes are detected
    // agg.GroupBy and hashIndexes
    private List<Integer> getDirectlyUsedIndexes(Component component) {
	final List<Integer> result = new ArrayList<Integer>();

	// add integers: hashIndexes and groupBy in aggregation
	final List<Integer> hashIndexes = component.getHashIndexes();
	if (hashIndexes != null)
	    result.addAll(hashIndexes);
	final AggregateOperator agg = component.getChainOperator()
		.getAggregation();
	if (agg != null) {
	    final List<Integer> groupBy = agg.getGroupByColumns();
	    if (groupBy != null)
		result.addAll(groupBy);
	}

	return result;
    }

    public void operate(QueryBuilder queryPlan) {
	bottomUp(queryPlan);
	topDown();
    }

    private int positionListIngoreHash(int normalized, List<Integer> hashIndexes) {
	int result = 0;
	int moves = 0;

	// take care of hashes which are on the continuous range from zero (0,
	// 1, 2, 3 ...)
	for (int i = 0; i < hashIndexes.size(); i++)
	    if (hashIndexes.contains(i))
		result++;

	while (moves < normalized) {
	    if (!hashIndexes.contains(result))
		moves++;
	    result++;
	}

	// if we are positioned on the hash, we have to move on
	while (hashIndexes.contains(result))
	    result++;

	return result;
    }

    private List<Integer> sortElimDuplicates(List<Integer> indexes) {
	Collections.sort(indexes);
	final List<Integer> result = new ArrayList<Integer>();

	int lastSeen = indexes.get(0);
	result.add(lastSeen);
	for (int i = 1; i < indexes.size(); i++) {
	    final int current = indexes.get(i);
	    if (current != lastSeen) {
		lastSeen = current;
		result.add(lastSeen);
	    }
	}
	return result;

	/*
	 * Shorter, but less efficient for(int index: indexes){
	 * if(!result.contains(index)){ result.add(index); } }
	 */
    }

    private void topDown() {
	Collections.sort(_cpList);
	for (final CompPackage cp : _cpList) {
	    final List<Integer> fromParents = arrivedFromParents(cp);
	    final Component comp = cp.getComponent();

	    // update Selection indexes
	    final List<ValueExpression> beforeProjVE = getBeforeProjVEs(comp);
	    final List<ColumnReference> beforeProjColRefs = ParserUtil
		    .getColumnRefFromVEs(beforeProjVE);
	    updateColumnRefs(beforeProjColRefs, fromParents);

	    // update Projection indexes
	    final List<ValueExpression> projVE = comp.getChainOperator()
		    .getProjection().getExpressions();
	    final List<ColumnReference> projColRefs = ParserUtil
		    .getColumnRefFromVEs(projVE);

	    // after bottom-up: projection will be set, so it will contain all
	    // the necessary fields,
	    // but later it might be moved because of up projections (total
	    // number of projections does not change)
	    final List<Integer> oldProjIndexes = ParserUtil
		    .getColumnRefIndexes(projColRefs);
	    _compOldProj.put(comp, oldProjIndexes);
	    updateColumnRefs(projColRefs, fromParents);

	}
    }

    private void updateColumnRefs(List<ColumnReference> crList,
	    List<Integer> filteredIndexList) {
	for (final ColumnReference cr : crList) {
	    final int oldIndex = cr.getColumnIndex();
	    final int newIndex = elemsBefore(oldIndex, filteredIndexList);
	    cr.setColumnIndex(newIndex);
	}
    }

    // the same as in directlyIndexes: agg.groupBy and hashIndexes
    private void updateIndexes(Component component,
	    List<Integer> filteredIndexList) {
	final List<Integer> oldHashIndexes = component.getHashIndexes();
	if (oldHashIndexes != null) {
	    final List<Integer> newHashIndexes = elemsBefore(oldHashIndexes,
		    filteredIndexList);
	    component.setOutputPartKey(newHashIndexes);
	}
	final AggregateOperator agg = component.getChainOperator()
		.getAggregation();
	if (agg != null) {
	    final List<Integer> oldGroupBy = agg.getGroupByColumns();
	    if (oldGroupBy != null && !oldGroupBy.isEmpty()) {
		final List<Integer> newGroupBy = elemsBefore(oldGroupBy,
			filteredIndexList);
		agg.setGroupByColumns(newGroupBy);
	    }
	}
    }
}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexCompGen.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.sf.jsqlparser.expression.Expression;
import ch.epfl.data.squall.api.sql.optimizers.CompGen;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.IndexJoinHashVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.components.EquiJoinComponent;
import ch.epfl.data.squall.expressions.ValueExpression;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

/*
 * It is necessary that this class operates with Tables,
 *   since we don't want multiple CG sharing the same copy of DataSourceComponent.
 */
public class IndexCompGen implements CompGen {
    private final SQLVisitor _pq;

    private final Schema _schema;
    private final String _dataPath;
    private final String _extension;

    private final QueryBuilder _queryBuilder = new QueryBuilder();

    // List of Components which are already added throughEquiJoinComponent and
    // OperatorComponent
    private final List<Component> _subPlans = new ArrayList<Component>();

    public IndexCompGen(Schema schema, SQLVisitor pq, Map map) {
	_schema = schema;
	_pq = pq;
	_dataPath = SystemParameters.getString(map, "DIP_DATA_PATH");
	_extension = SystemParameters.getString(map, "DIP_EXTENSION");
    }

    // set hash for this component, knowing its position in the query plan.
    // Conditions are related only to parents of join,
    // but we have to filter who belongs to my branch in IndexJoinHashVisitor.
    // We don't want to hash on something which will be used to join with same
    // later component in the hierarchy.
    private void addHash(Component component, List<Expression> joinCondition) {
	final IndexJoinHashVisitor joinOn = new IndexJoinHashVisitor(_schema,
		component, _pq.getTan());
	for (final Expression exp : joinCondition)
	    exp.accept(joinOn);
	final List<ValueExpression> hashExpressions = joinOn.getExpressions();

	if (ParserUtil.isAllColumnRefs(hashExpressions)) {
	    // all the join conditions are represented through columns, no
	    // ValueExpression (neither in joined component)
	    // guaranteed that both joined components will have joined columns
	    // visited in the same order
	    // i.e R.A=S.A and R.B=S.B, the columns are (R.A, R.B), (S.A, S.B),
	    // respectively
	    final List<Integer> hashIndexes = ParserUtil
		    .extractColumnIndexes(hashExpressions);

	    // hash indexes in join condition
	    component.setOutputPartKey(hashIndexes);
	} else
	    // hahs expressions in join condition
	    component.setHashExpressions(hashExpressions);
    }

    /*
     * adding a DataSourceComponent to the list of components
     */
    @Override
    public DataSourceComponent generateDataSource(String tableCompName) {
	final String tableSchemaName = _pq.getTan()
		.getSchemaName(tableCompName);
	final String sourceFile = tableSchemaName.toLowerCase();

	final DataSourceComponent relation = new DataSourceComponent(
		tableCompName, _dataPath + sourceFile + _extension);
	_queryBuilder.add(relation);
	_subPlans.add(relation);
	return relation;
    }

    /*
     * Join between two components List<Expression> is a set of join conditions
     * between two components.
     */
    @Override
    public Component generateEquiJoin(Component left, Component right) {
	final EquiJoinComponent joinComponent = new EquiJoinComponent(left,
		right);
	_queryBuilder.add(joinComponent);

	// compute join condition
	final List<Expression> joinCondition = ParserUtil.getJoinCondition(_pq,
		left, right);
	if (joinCondition == null)
	    throw new RuntimeException(
		    "There is no join conditition between components "
			    + left.getName() + " and " + right.getName());

	// set hashes for two parents
	addHash(left, joinCondition);
	addHash(right, joinCondition);

	_subPlans.remove(left);
	_subPlans.remove(right);
	_subPlans.add(joinComponent);

	return joinComponent;
    }

    @Override
    public QueryBuilder getQueryBuilder() {
	return _queryBuilder;
    }

    @Override
    public List<Component> getSubPlans() {
	return _subPlans;
    }

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexRuleOptimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
import net.sf.jsqlparser.schema.Table;
import net.sf.jsqlparser.statement.select.SelectItem;

import org.apache.log4j.Logger;

import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.HierarchyExtractor;
import ch.epfl.data.squall.api.sql.util.JoinTablesExprs;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.AndVisitor;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.IndexSelectItemsVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.IndexWhereVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.components.OperatorComponent;
import ch.epfl.data.squall.expressions.ValueExpression;
import ch.epfl.data.squall.operators.AggregateOperator;
import ch.epfl.data.squall.operators.ProjectOperator;
import ch.epfl.data.squall.operators.SelectOperator;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.DeepCopy;

/*
 * It generates a single query plan, adds a final aggregation,
 *   adds selections (WHERE clause) and do early projections (all unused columns are projected away)
 *
 * Does not take relation cardinalities into account.
 * Assume no projections before the aggregation, so that EarlyProjection may impose some projections.
 * Aggregation only on the last level.
 */
public class IndexRuleOptimizer implements Optimizer {
    private static Logger LOG = Logger.getLogger(IndexRuleOptimizer.class);

    private final Schema _schema;
    private final SQLVisitor _pq;
    private IndexCompGen _cg;
    private final IndexTranslator _it;
    private final Map _map; // map is updates in place

    public IndexRuleOptimizer(Map map) {
	_map = map;
	_pq = ParserUtil.parseQuery(map);

	_schema = new Schema(map);
	_it = new IndexTranslator(_schema, _pq.getTan());
    }

    private void attachSelectClause(Component lastComponent,
	    List<AggregateOperator> aggOps, List<ValueExpression> groupByVEs) {
	if (aggOps.isEmpty()) {
	    final ProjectOperator project = new ProjectOperator(groupByVEs);
	    lastComponent.add(project);
	} else if (aggOps.size() == 1) {
	    // all the others are group by
	    final AggregateOperator firstAgg = aggOps.get(0);

	    if (ParserUtil.isAllColumnRefs(groupByVEs)) {
		// plain fields in select
		final List<Integer> groupByColumns = ParserUtil
			.extractColumnIndexes(groupByVEs);
		firstAgg.setGroupByColumns(groupByColumns);

		// Setting new level of components is necessary for correctness
		// only for distinct in aggregates
		// but it's certainly pleasant to have the final result grouped
		// on nodes by group by columns.
		final boolean newLevel = !(_it.isHashedBy(lastComponent,
			groupByColumns));
		if (newLevel) {
		    lastComponent.setOutputPartKey(groupByColumns);
		    OperatorComponent oc = new OperatorComponent(lastComponent,
			    ParserUtil.generateUniqueName("OPERATOR"))
			    .add(firstAgg);
		    _cg.getQueryBuilder().add(oc);

		} else
		    lastComponent.add(firstAgg);
	    } else {
		// Sometimes groupByVEs contains other functions, so we have to
		// use projections instead of simple groupBy
		// always new level

		// WARNING: groupByVEs cannot be used on two places: that's why
		// we do deep copy
		final ProjectOperator groupByProj = new ProjectOperator(
			(List<ValueExpression>) DeepCopy.copy(groupByVEs));
		if (!(groupByProj.getExpressions() == null || groupByProj
			.getExpressions().isEmpty()))
		    firstAgg.setGroupByProjection(groupByProj);

		// current component
		lastComponent
			.setHashExpressions((List<ValueExpression>) DeepCopy
				.copy(groupByVEs));

		OperatorComponent oc = new OperatorComponent(lastComponent,
			ParserUtil.generateUniqueName("OPERATOR"))
			.add(firstAgg);
		_cg.getQueryBuilder().add(oc);
	    }
	} else
	    throw new RuntimeException(
		    "For now only one aggregate function supported!");
    }

    private void attachWhereClause(Component affectedComponent,
	    SelectOperator select) {
	affectedComponent.add(select);
    }

    private void earlyProjection(QueryBuilder queryPlan) {
	final EarlyProjection early = new EarlyProjection(_schema, _pq.getTan());
	early.operate(queryPlan);
    }

    @Override
    public QueryBuilder generate() {
	_cg = generateTableJoins();

	LOG.info("Before WHERE, SELECT and EarlyProjection: ");
	LOG.info(ParserUtil.toString(_cg.getQueryBuilder()));

	// selectItems might add OperatorComponent, this is why it goes first
	final int queryType = processSelectClause(_pq.getSelectItems());
	processWhereClause(_pq.getWhereExpr());
	if (queryType == IndexSelectItemsVisitor.NON_AGG)
	    LOG.info("Early projection will not be performed since the query is NON_AGG type (contains projections)!");
	else
	    earlyProjection(_cg.getQueryBuilder());

	ParserUtil.orderOperators(_cg.getQueryBuilder());

	final RuleParallelismAssigner parAssign = new RuleParallelismAssigner(
		_cg.getQueryBuilder(), _pq.getTan(), _schema, _map);
	parAssign.assignPar();

	return _cg.getQueryBuilder();
    }

    private IndexCompGen generateTableJoins() {
	final List<Table> tableList = _pq.getTableList();
	final TableSelector ts = new TableSelector(tableList, _schema,
		_pq.getTan());
	final JoinTablesExprs jte = _pq.getJte();

	final IndexCompGen cg = new IndexCompGen(_schema, _pq, _map);

	// first phase
	// make high level pairs
	final List<String> skippedBestTableNames = new ArrayList<String>();
	final int numTables = tableList.size();
	if (numTables == 1) {
	    cg.generateDataSource(ParserUtil.getComponentName(tableList.get(0)));
	    return cg;
	} else {
	    final int highLevelPairs = getNumHighLevelPairs(numTables);

	    for (int i = 0; i < highLevelPairs; i++) {
		final String bestTableName = ts.removeBestTableName();

		// enumerates all the tables it has joinCondition to join with
		final List<String> joinedWith = jte
			.getJoinedWith(bestTableName);
		// dependent on previously used tables, so might return null
		final String bestPairedTable = ts
			.removeBestPairedTableName(joinedWith);
		if (bestPairedTable != null) {
		    // we found a pair
		    final DataSourceComponent bestSource = cg
			    .generateDataSource(bestTableName);
		    final DataSourceComponent bestPairedSource = cg
			    .generateDataSource(bestPairedTable);
		    cg.generateEquiJoin(bestSource, bestPairedSource);
		} else
		    // we have to keep this table for latter processing
		    skippedBestTableNames.add(bestTableName);
	    }
	}

	// second phase
	// join (2-way join components) with unused tables, until there is no
	// more tables
	List<Component> subPlans = cg.getSubPlans();

	/*
	 * Why outer loop is unpairedTables, and inner is subPlans: 1) We first
	 * take care of small tables 2) In general, there is smaller number of
	 * unpaired tables than tables 3) Number of ancestors always grow, while
	 * number of joinedTables is a constant Bad side is updating of
	 * subPlanAncestors, but than has to be done anyway LinkedHashMap
	 * guarantees in order iterator
	 */
	List<String> unpairedTableNames = ts.removeAll();
	unpairedTableNames.addAll(skippedBestTableNames);
	while (!unpairedTableNames.isEmpty()) {
	    final List<String> stillUnprocessed = new ArrayList<String>();
	    // we will try to join all the tables, but some of them cannot be
	    // joined before some other tables
	    // that's why we have while outer loop
	    for (final String unpaired : unpairedTableNames) {
		boolean processed = false;
		for (final Component currentComp : subPlans)
		    if (_pq.getJte().joinExistsBetween(unpaired,
			    ParserUtil.getSourceNameList(currentComp))) {
			final DataSourceComponent unpairedSource = cg
				.generateDataSource(unpaired);
			cg.generateEquiJoin(currentComp, unpairedSource);

			processed = true;
			break;
		    }
		if (!processed)
		    stillUnprocessed.add(unpaired);
	    }
	    unpairedTableNames = stillUnprocessed;
	}

	// third phase: joining Components until there is a single component
	subPlans = cg.getSubPlans();
	while (subPlans.size() > 1) {
	    // this is joining of components having approximately the same
	    // number of ancestors - the same level
	    final Component firstComp = subPlans.get(0);
	    final List<String> firstAncestors = ParserUtil
		    .getSourceNameList(firstComp);
	    for (int i = 1; i < subPlans.size(); i++) {
		final Component otherComp = subPlans.get(i);
		final List<String> otherAncestors = ParserUtil
			.getSourceNameList(otherComp);
		if (_pq.getJte().joinExistsBetween(firstAncestors,
			otherAncestors)) {
		    cg.generateEquiJoin(firstComp, otherComp);
		    break;
		}
	    }
	    // until this point, we change subPlans by locally remove operations
	    // when going to the next level, whesh look over subPlans is taken
	    subPlans = cg.getSubPlans();
	}
	return cg;
    }

    private int getNumHighLevelPairs(int numTables) {
	int highLevelPairs = 0;
	if (numTables == 2)
	    highLevelPairs = 1;
	else if (numTables > 2)
	    highLevelPairs = (numTables % 2 == 0 ? numTables / 2 - 1
		    : numTables / 2);
	return highLevelPairs;
    }

    /*
     * this method returns a list of <ComponentName, whereCompExpression>
     * 
     * @whereCompExpression part of JSQL expression which relates to the
     * corresponding Component
     */
    private Map<String, Expression> getWhereForComponents(Expression whereExpr) {
	final AndVisitor andVisitor = new AndVisitor();
	whereExpr.accept(andVisitor);
	final List<Expression> atomicExprs = andVisitor.getAtomicExprs();
	final List<OrExpression> orExprs = andVisitor.getOrExprs();

	/*
	 * we have to group atomicExpr (conjuctive terms) by ComponentName there
	 * might be mutliple columns from a single DataSourceComponent, and we
	 * want to group them conditions such as R.A + R.B = 10 are possible not
	 * possible to have ColumnReference from multiple tables, because than
	 * it would be join condition
	 */
	final Map<String, Expression> collocatedExprs = new HashMap<String, Expression>();
	ParserUtil.addAndExprsToComps(collocatedExprs, atomicExprs);

	final Map<Set<String>, Expression> collocatedOrs = new HashMap<Set<String>, Expression>();
	ParserUtil.addOrExprsToComps(collocatedOrs, orExprs);

	for (final Map.Entry<Set<String>, Expression> orEntry : collocatedOrs
		.entrySet()) {
	    final List<String> compNames = new ArrayList<String>(
		    orEntry.getKey());
	    final List<Component> compList = ParserUtil.getComponents(
		    compNames, _cg);
	    final Component affectedComponent = HierarchyExtractor
		    .getLCM(compList);

	    final Expression orExpr = orEntry.getValue();
	    ParserUtil.addAndExprToComp(collocatedExprs, orExpr,
		    affectedComponent.getName());
	}

	return collocatedExprs;
    }

    /*************************************************************************************
     * SELECT clause - Final Aggregation
     *************************************************************************************/

    private int processSelectClause(List<SelectItem> selectItems) {
	final IndexSelectItemsVisitor selectVisitor = new IndexSelectItemsVisitor(
		_cg.getQueryBuilder(), _schema, _pq.getTan(), _map);
	for (final SelectItem elem : selectItems)
	    elem.accept(selectVisitor);
	final List<AggregateOperator> aggOps = selectVisitor.getAggOps();
	final List<ValueExpression> groupByVEs = selectVisitor.getGroupByVEs();

	final Component affectedComponent = _cg.getQueryBuilder()
		.getLastComponent();
	attachSelectClause(affectedComponent, aggOps, groupByVEs);
	return (aggOps.isEmpty() ? IndexSelectItemsVisitor.NON_AGG
		: IndexSelectItemsVisitor.AGG);
    }

    /*************************************************************************************
     * WHERE clause - SelectOperator
     *************************************************************************************/

    private void processWhereClause(Expression whereExpr) {
	if (whereExpr == null)
	    return;

	// assinging JSQL expressions to Components
	final Map<String, Expression> whereCompExprPairs = getWhereForComponents(whereExpr);

	// Each component process its own part of JSQL whereExpression
	for (final Map.Entry<String, Expression> whereCompExprPair : whereCompExprPairs
		.entrySet()) {
	    final Component affectedComponent = _cg.getQueryBuilder()
		    .getComponent(whereCompExprPair.getKey());
	    final Expression whereCompExpr = whereCompExprPair.getValue();
	    processWhereForComponent(affectedComponent, whereCompExpr);
	}

    }

    /*
     * whereCompExpression is the part of WHERE clause which refers to
     * affectedComponent This is the only method in this class where
     * IndexWhereVisitor is actually instantiated and invoked
     */
    private void processWhereForComponent(Component affectedComponent,
	    Expression whereCompExpression) {
	final IndexWhereVisitor whereVisitor = new IndexWhereVisitor(
		affectedComponent, _schema, _pq.getTan());
	whereCompExpression.accept(whereVisitor);
	attachWhereClause(affectedComponent, whereVisitor.getSelectOperator());
    }

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexSimpleOptimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.List;
import java.util.Map;

import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.schema.Table;
import net.sf.jsqlparser.statement.select.SelectItem;
import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.IndexSelectItemsVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.IndexWhereVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.components.OperatorComponent;
import ch.epfl.data.squall.expressions.ValueExpression;
import ch.epfl.data.squall.operators.AggregateOperator;
import ch.epfl.data.squall.operators.ProjectOperator;
import ch.epfl.data.squall.operators.SelectOperator;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.DeepCopy;

/*
 * Generate a query plan as it was parsed from the SQL.
 * SELECT and WHERE clause are attached to the final component.
 */
public class IndexSimpleOptimizer implements Optimizer {
    private final SQLVisitor _pq;
    private final Schema _schema;
    private final Map _map;

    private IndexCompGen _cg;
    private final IndexTranslator _it;

    public IndexSimpleOptimizer(Map map) {
	_map = map;
	_pq = ParserUtil.parseQuery(map);

	_schema = new Schema(map);
	_it = new IndexTranslator(_schema, _pq.getTan());
    }

    private void attachSelectClause(List<AggregateOperator> aggOps,
	    List<ValueExpression> groupByVEs, Component affectedComponent) {
	if (aggOps.isEmpty()) {
	    final ProjectOperator project = new ProjectOperator(groupByVEs);
	    affectedComponent.add(project);
	} else if (aggOps.size() == 1) {
	    // all the others are group by
	    final AggregateOperator firstAgg = aggOps.get(0);

	    if (ParserUtil.isAllColumnRefs(groupByVEs)) {
		// plain fields in select
		final List<Integer> groupByColumns = ParserUtil
			.extractColumnIndexes(groupByVEs);
		firstAgg.setGroupByColumns(groupByColumns);

		// Setting new level of components is necessary for correctness
		// only for distinct in aggregates
		// but it's certainly pleasant to have the final result grouped
		// on nodes by group by columns.
		final boolean newLevel = !(_it.isHashedBy(affectedComponent,
			groupByColumns));
		if (newLevel) {
		    affectedComponent.setOutputPartKey(groupByColumns);
		    OperatorComponent oc = new OperatorComponent(
			    affectedComponent,
			    ParserUtil.generateUniqueName("OPERATOR"))
			    .add(firstAgg);
		    _cg.getQueryBuilder().add(oc);
		} else
		    affectedComponent.add(firstAgg);
	    } else {
		// Sometimes groupByVEs contains other functions, so we have to
		// use projections instead of simple groupBy
		// always new level

		if (affectedComponent.getHashExpressions() != null
			&& !affectedComponent.getHashExpressions().isEmpty())
		    throw new RuntimeException(
			    "Too complex: cannot have hashExpression both for joinCondition and groupBy!");

		// WARNING: groupByVEs cannot be used on two places: that's why
		// we do deep copy
		final ProjectOperator groupByProj = new ProjectOperator(
			(List<ValueExpression>) DeepCopy.copy(groupByVEs));
		if (!(groupByProj.getExpressions() == null || groupByProj
			.getExpressions().isEmpty()))
		    firstAgg.setGroupByProjection(groupByProj);

		// current component
		affectedComponent
			.setHashExpressions((List<ValueExpression>) DeepCopy
				.copy(groupByVEs));

		OperatorComponent oc = new OperatorComponent(affectedComponent,
			ParserUtil.generateUniqueName("OPERATOR"))
			.add(firstAgg);
		_cg.getQueryBuilder().add(oc);

	    }
	} else
	    throw new RuntimeException(
		    "For now only one aggregate function supported!");
    }

    private void attachWhereClause(SelectOperator select,
	    Component affectedComponent) {
	affectedComponent.add(select);
    }

    @Override
    public QueryBuilder generate() {
	_cg = generateTableJoins();

	// selectItems might add OperatorComponent, this is why it goes first
	processSelectClause(_pq.getSelectItems());
	processWhereClause(_pq.getWhereExpr());

	ParserUtil.orderOperators(_cg.getQueryBuilder());

	final RuleParallelismAssigner parAssign = new RuleParallelismAssigner(
		_cg.getQueryBuilder(), _pq.getTan(), _schema, _map);
	parAssign.assignPar();

	return _cg.getQueryBuilder();
    }

    private IndexCompGen generateTableJoins() {
	final List<Table> tableList = _pq.getTableList();

	final IndexCompGen cg = new IndexCompGen(_schema, _pq, _map);
	Component firstParent = cg.generateDataSource(ParserUtil
		.getComponentName(tableList.get(0)));

	// a special case
	if (tableList.size() == 1)
	    return cg;

	// This generates a lefty query plan.
	for (int i = 0; i < tableList.size() - 1; i++) {
	    final DataSourceComponent secondParent = cg
		    .generateDataSource(ParserUtil.getComponentName(tableList
			    .get(i + 1)));
	    firstParent = cg.generateEquiJoin(firstParent, secondParent);
	}
	return cg;
    }

    private int processSelectClause(List<SelectItem> selectItems) {
	final IndexSelectItemsVisitor selectVisitor = new IndexSelectItemsVisitor(
		_cg.getQueryBuilder(), _schema, _pq.getTan(), _map);
	for (final SelectItem elem : selectItems)
	    elem.accept(selectVisitor);
	final List<AggregateOperator> aggOps = selectVisitor.getAggOps();
	final List<ValueExpression> groupByVEs = selectVisitor.getGroupByVEs();

	final Component affectedComponent = _cg.getQueryBuilder()
		.getLastComponent();
	attachSelectClause(aggOps, groupByVEs, affectedComponent);
	return (aggOps.isEmpty() ? IndexSelectItemsVisitor.NON_AGG
		: IndexSelectItemsVisitor.AGG);
    }

    private void processWhereClause(Expression whereExpr) {
	// all the selection are performed on the last component
	final Component affectedComponent = _cg.getQueryBuilder()
		.getLastComponent();
	final IndexWhereVisitor whereVisitor = new IndexWhereVisitor(
		affectedComponent, _schema, _pq.getTan());
	if (whereExpr != null) {
	    whereExpr.accept(whereVisitor);
	    attachWhereClause(whereVisitor.getSelectOperator(),
		    affectedComponent);
	}
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexTranslator.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.ArrayList;
import java.util.List;

import net.sf.jsqlparser.schema.Column;
import ch.epfl.data.squall.api.sql.schema.ColumnNameType;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.util.TableAliasName;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;

public class IndexTranslator {
    private final Schema _schema;
    private final TableAliasName _tan;

    public IndexTranslator(Schema schema, TableAliasName tan) {
	_schema = schema;
	_tan = tan;
    }

    public boolean contains(List<ColumnNameType> tupleSchema, String columnName) {
	final int index = indexOf(tupleSchema, columnName);
	return index != ParserUtil.NOT_FOUND;
    }

    public int getChildIndex(int originalIndex, Component originator,
	    Component requestor) {
	final Component child = originator.getChild();
	final Component[] parents = child.getParents();

	if (child.getChainOperator().getProjection() != null)
	    throw new RuntimeException(
		    "Cannot use getChildIndex method on the component with Projection! getOutputSize does not work anymore!");

	int index = originalIndex;

	if (parents.length < 2)
	    // no changes, only one parent
	    return index;

	// only right parent changes the index
	final Component leftParent = parents[0];
	final Component rightParent = parents[1];

	if (rightParent.equals(originator))
	    if (!rightParent.getHashIndexes().contains(originalIndex)) {
		// requested column is *not* in joinColumns
		final int indexesBefore = ParserUtil.getNumElementsBefore(
			originalIndex, rightParent.getHashIndexes());
		index = ParserUtil.getPreOpsOutputSize(leftParent, _schema,
			_tan) - indexesBefore + originalIndex;
	    } else {
		// requested column is in joinColumns
		// if in the keys have to find lhs index
		final int joinIndex = rightParent.getHashIndexes().indexOf(
			originalIndex);
		index = leftParent.getHashIndexes().get(joinIndex);
	    }

	if (child.equals(requestor))
	    return index;
	else
	    return getChildIndex(index, originator.getChild(), requestor);
    }

    /*
     * For a given component and column, find out the index of that column in a
     * given component. not meant to be used with projections - EarlyProjection
     * is the very last thing done on the plan tupleSchema is not used here
     * (it's used for Cost-based optimizer, where each component updates the
     * schema after each operator)
     */
    public int getColumnIndex(Column column, Component requestor) {
	final String columnName = column.getColumnName();
	final String tblCompName = ParserUtil.getComponentName(column);
	final String tableSchemaName = _tan.getSchemaName(tblCompName);
	final List<ColumnNameType> columns = _schema
		.getTableSchema(tableSchemaName);

	final int originalIndex = indexOf(columns, columnName);

	// finding originator by name in the list of ancestors
	final List<DataSourceComponent> sources = requestor
		.getAncestorDataSources();
	Component originator = null;
	for (final DataSourceComponent source : sources)
	    if (source.getName().equals(tblCompName)) {
		originator = source;
		break;
	    }

	if (requestor.equals(originator))
	    return originalIndex;
	else
	    return getChildIndex(originalIndex, originator, requestor);
    }

    /*
     * Not used outside this class. For a field N1.NATIONNAME, columnName is
     * NATIONNAME List<ColumnNameType> is from a Schema Table (TPCH.nation)
     */
    public int indexOf(List<ColumnNameType> tupleSchema, String columnName) {
	for (int i = 0; i < tupleSchema.size(); i++)
	    if (tupleSchema.get(i).getName().equals(columnName))
		return i;
	return ParserUtil.NOT_FOUND;
    }

    /*
     * Is component already hashed by hashIndexes (does its parent sends tuples
     * hashed by hashIndexes). hashIndexes are indexes wrt component. If returns
     * true not only if hashes are equivalent, but also if the parent groups
     * tuples exactly the same as the affected component, with addition of some
     * more columns. This means that Join and Aggregation can be performed on
     * the same node. Inspiration taken from the Nephele paper.
     */
    public boolean isHashedBy(Component component, List<Integer> hashIndexes) {
	final Component[] parents = component.getParents();
	if (parents != null) {
	    // if both parents have only hashIndexes, they point to the same
	    // indexes in the child
	    // so we choose arbitrarily first parent
	    final Component parent = parents[0];
	    final List<Integer> parentHashes = parent.getHashIndexes();
	    if (parent.getHashExpressions() == null) {
		final List<Integer> parentHashIndexes = new ArrayList<Integer>();
		for (final int parentHash : parentHashes)
		    parentHashIndexes.add(getChildIndex(parentHash, parent,
			    component));
		return isSuperset(parentHashIndexes, hashIndexes);
	    }
	}
	// if there are HashExpressions, we don't bother to do analysis, we know
	// it's false
	return false;
    }

    private boolean isSuperset(List<Integer> parentHashIndexes,
	    List<Integer> affectedHashIndexes) {
	final int parentSize = parentHashIndexes.size();
	final int affectedSize = affectedHashIndexes.size();

	if (parentSize < affectedSize)
	    return false;
	else if (parentSize == affectedSize)
	    return parentHashIndexes.equals(affectedHashIndexes);
	else {
	    // parent partitions more than necessary for a child
	    for (int i = 0; i < affectedSize; i++)
		if (!(affectedHashIndexes.get(i).equals(parentHashIndexes
			.get(i))))
		    return false;
	    return true;
	}
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/LevelAssigner.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

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

public class LevelAssigner {
    private final List<DataSourceComponent> _dsList = new ArrayList<DataSourceComponent>();
    private final List<CompLevel> _clList = new ArrayList<CompLevel>(); // list
									// of
									// all
    // Components
    // which are
    // not
    // DataSourceComponent

    private int _maxLevel = 0;

    public LevelAssigner(Component lastComponent) {
	visit(lastComponent, 0);
	orderComponents();
    }

    public List<CompLevel> getNonSourceComponents() {
	return _clList;
    }

    public List<DataSourceComponent> getSources() {
	return _dsList;
    }

    // order them such that the first component after dataSource has height 1,
    // ..., the root has the highest height
    private void orderComponents() {
	for (final CompLevel cl : _clList) {
	    final int level = cl.getLevel();
	    final int newLevel = _maxLevel - level;
	    cl.setLevel(newLevel);
	}
	Collections.sort(_clList);
    }

    // level from the root
    private void visit(Component comp, int level) {
	if (_maxLevel < level)
	    _maxLevel = level;

	if (comp instanceof DataSourceComponent)
	    _dsList.add((DataSourceComponent) comp);
	else {
	    _clList.add(new CompLevel(comp, level));

	    for (final Component parent : comp.getParents())
		visit(parent, level + 1);
	}
    }
}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/RuleParallelismAssigner.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.List;
import java.util.Map;

import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.TableAliasName;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

public class RuleParallelismAssigner {
    private final int THRESHOLD_TUPLES = 100; // both nation and region has less
    // number of tuples

    private final QueryBuilder _plan;
    private final int _maxInputPar;
    private final TableAliasName _tan;
    private final Schema _schema;
    private final Map _map;

    public RuleParallelismAssigner(QueryBuilder plan, TableAliasName tan,
	    Schema schema, Map map) {
	_plan = plan;
	_tan = tan;
	_schema = schema;
	_map = map;
	_maxInputPar = SystemParameters.getInt(map, "DIP_MAX_SRC_PAR");
    }

    public void assignPar() {
	final LevelAssigner topDown = new LevelAssigner(
		_plan.getLastComponent());
	final List<DataSourceComponent> dsList = topDown.getSources();
	final List<CompLevel> clList = topDown.getNonSourceComponents();

	assignParDataSource(dsList);
	assignParNonDataSource(clList);
    }

    private void assignParDataSource(List<DataSourceComponent> sources) {
	for (final DataSourceComponent source : sources) {
	    final String compName = source.getName();
	    final String compMapStr = compName + "_PAR";
	    if (getNumOfTuples(compName) > THRESHOLD_TUPLES)
		SystemParameters.putInMap(_map, compMapStr, _maxInputPar);
	    else
		SystemParameters.putInMap(_map, compMapStr, 1);
	}
    }

    private void assignParNonDataSource(List<CompLevel> clList) {
	for (final CompLevel cl : clList) {
	    final Component comp = cl.getComponent();
	    final String compName = comp.getName();
	    final String compMapStr = compName + "_PAR";
	    int level = cl.getLevel();

	    if (comp.getParents().length < 2)
		// an operatorComponent should have no more parallelism than its
		// (only) parent
		level--;

	    // TODO: for the last operatorComponent, parallelism should be based
	    // on groupBy

	    int parallelism = (int) (_maxInputPar * Math.pow(2, level - 2));
	    if (parallelism < 1)
		// cannot be less than 1
		parallelism = 1;

	    SystemParameters.putInMap(_map, compMapStr, parallelism);
	}
    }

    private long getNumOfTuples(String compName) {
	final String schemaName = _tan.getSchemaName(compName);
	return _schema.getTableSize(schemaName);
    }
}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/TableSelector.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.index;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import net.sf.jsqlparser.schema.Table;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.util.TableAliasName;

public class TableSelector {
    public class PairTableNameSize implements Comparable<PairTableNameSize> {
	private final String _tableName;
	private final long _size;

	public PairTableNameSize(Table table, long size) {
	    _tableName = ParserUtil.getComponentName(table);
	    _size = size;
	}

	@Override
	public int compareTo(PairTableNameSize t) {
	    final long otherSize = t.getSize();
	    return (new Long(_size)).compareTo(new Long(otherSize));
	}

	public long getSize() {
	    return _size;
	}

	public String getTableName() {
	    return _tableName;
	}
    }

    private final List<PairTableNameSize> _pairsTableNameSize;

    private final TableAliasName _tan;

    public TableSelector(List<Table> listTables, Schema schema,
	    TableAliasName tan) {
	_tan = tan;

	// generateSubplan (table, size) list from tables from the query
	_pairsTableNameSize = createSizePairs(listTables, schema);
	// in place sort
	Collections.sort(_pairsTableNameSize);
    }

    private List<PairTableNameSize> createSizePairs(List<Table> listTables,
	    Schema schema) {
	final List<PairTableNameSize> pairsTableSize = new ArrayList<PairTableNameSize>();
	for (final Table table : listTables) {
	    final String schemaName = _tan.getSchemaName(ParserUtil
		    .getComponentName(table));
	    final long tableSize = schema.getTableSize(schemaName);

	    final PairTableNameSize pts = new PairTableNameSize(table,
		    tableSize);
	    pairsTableSize.add(pts);
	}
	return pairsTableSize;
    }

    public List<String> removeAll() {
	final List<String> tableNameList = new ArrayList<String>();
	while (!_pairsTableNameSize.isEmpty())
	    tableNameList.add(_pairsTableNameSize.remove(0).getTableName());
	return tableNameList;
    }

    // Best means smallest available from the pairs
    public String removeBestPairedTableName(List<String> joinedWith) {
	for (int i = 0; i < _pairsTableNameSize.size(); i++) {
	    final PairTableNameSize pts = _pairsTableNameSize.get(i);
	    final String currentTableName = pts.getTableName();
	    if (joinedWith.contains(currentTableName)) {
		_pairsTableNameSize.remove(i);
		return currentTableName;
	    }
	}
	// all the pairs I can join with are already taken
	return null;
    }

    // best means the smallest available
    public String removeBestTableName() {
	return _pairsTableNameSize.remove(0).getTableName();
    }

    public int size() {
	return _pairsTableNameSize.size();
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostEstimator.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.schema.Column;
import ch.epfl.data.squall.api.sql.estimators.SelingerSelectivityEstimator;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.components.EquiJoinComponent;
import ch.epfl.data.squall.components.OperatorComponent;

/*
 * Responsible for computing selectivities, cardinalities and parallelism for NCG._compCost
 * Instantiates CostParallelismAssigner
 */
public class CostEstimator {
    private final String _queryName;
    private final SQLVisitor _pq;
    private final Schema _schema;

    // needed because NameCompGen sets parallelism for all the components
    private final CostParallelismAssigner _parAssigner;

    private final Map<String, CostParams> _compCost;
    private final SelingerSelectivityEstimator _selEstimator;

    public CostEstimator(String queryName, Schema schema, SQLVisitor pq,
	    Map<String, CostParams> compCost,
	    CostParallelismAssigner parAssigner) {
	_queryName = queryName;
	_pq = pq;
	_schema = schema;
	_compCost = compCost;

	_parAssigner = parAssigner;
	_selEstimator = new SelingerSelectivityEstimator(_queryName, schema,
		_pq.getTan());
    }

    private double computeHashSelectivity(String leftJoinTableSchemaName,
	    String rightJoinTableSchemaName, long leftCardinality,
	    long rightCardinality) {
	final long inputCardinality = leftCardinality + rightCardinality;
	double selectivity;

	if (leftJoinTableSchemaName.equals(rightJoinTableSchemaName))
	    // we treat this as a cross-product on which some selections are
	    // performed
	    // IMPORTANT: selectivity is the output/input rate in the case of
	    // EquiJoin
	    selectivity = (leftCardinality * rightCardinality)
		    / inputCardinality;
	else {
	    double ratio = _schema.getRatio(leftJoinTableSchemaName,
		    rightJoinTableSchemaName);
	    if (ratio < 1)
		// if we are joining bigger and smaller relation, the size of
		// join does not decrease
		// it has to be 1
		ratio = 1;
	    // in case of bushy plans it's proportion of sizes
	    // for lefty plans it's enough to be selectivity of the right parent
	    // component (from compCost)
	    final double rightSelectivity = ((double) rightCardinality)
		    / _schema.getTableSize(rightJoinTableSchemaName);
	    selectivity = (leftCardinality * ratio * rightSelectivity)
		    / inputCardinality;
	}
	return selectivity;
    }

    // ***********HELPER methods***********
    private double computeJoinSelectivity(EquiJoinComponent joinComponent,
	    List<Expression> joinCondition, long leftCardinality,
	    long rightCardinality) {

	final Component[] parents = joinComponent.getParents();
	double selectivity = 1;

	final List<Column> joinColumns = ParserUtil
		.getJSQLColumns(joinCondition);
	final List<String> joinCompNames = ParserUtil
		.getCompNamesFromColumns(joinColumns);

	final List<String> leftJoinTableSchemaNames = getJoinSchemaNames(
		joinCompNames, parents[0]);
	final List<String> rightJoinTableSchemaNames = getJoinSchemaNames(
		joinCompNames, parents[1]);

	if (rightJoinTableSchemaNames.size() > 1)
	    throw new RuntimeException(
		    "Currently, this support only lefty plans!");
	final String rightJoinTableSchemaName = rightJoinTableSchemaNames
		.get(0);

	int i = 0;
	for (final String leftJoinTableSchemaName : leftJoinTableSchemaNames) {
	    double hashSelectivity = computeHashSelectivity(
		    leftJoinTableSchemaName, rightJoinTableSchemaName,
		    leftCardinality, rightCardinality);
	    if (i > 0 && hashSelectivity > 1)
		// having multiple hashSelectivities means that we have
		// AndCondition between them,
		// so they cannot amplify each other.
		hashSelectivity = 1;
	    selectivity *= hashSelectivity;
	    i++;
	}

	return selectivity;
    }

    /*
     * @allJoinCompNames - all the component names from the join condition
     * joinCompNames - all the component names from the join condition
     * corresponding to parent
     */
    private List<String> getJoinSchemaNames(List<String> allJoinCompNames,
	    Component parent) {
	final List<String> ancestors = ParserUtil.getSourceNameList(parent);
	final List<String> joinCompNames = ParserUtil.getIntersection(
		ancestors, allJoinCompNames);

	final List<String> joinSchemaNames = new ArrayList<String>();
	for (final String joinCompName : joinCompNames)
	    joinSchemaNames.add(_pq.getTan().getSchemaName(joinCompName));
	return joinSchemaNames;
    }

    // ***********OPERATORS***********
    public void processWhereCost(Component component, Expression whereCompExpr) {
	if (whereCompExpr != null) {
	    // this is going to change selectivity
	    final String compName = component.getName();
	    final CostParams costParams = _compCost.get(compName);
	    final double previousSelectivity = costParams.getSelectivity();

	    final double selectivity = previousSelectivity
		    * _selEstimator.estimate(whereCompExpr);
	    costParams.setSelectivity(selectivity);
	}
    }

    // ***********SOURCES***********
    // for now only cardinalities
    public void setInputParams(DataSourceComponent source) {
	final String compName = source.getName();
	final String schemaName = _pq.getTan().getSchemaName(compName);

	final CostParams costParams = _compCost.get(compName);
	costParams.setCardinality(_schema.getTableSize(schemaName));
    }

    // ***********EquiJoinComponent***********
    public void setInputParams(EquiJoinComponent joinComponent,
	    List<Expression> joinCondition) {
	final CostParams costParams = _compCost.get(joinComponent.getName());
	final Component[] parents = joinComponent.getParents();

	// ********* set initial (join) selectivity and initial cardinality
	final long leftCardinality = _compCost.get(parents[0].getName())
		.getCardinality();
	final long rightCardinality = _compCost.get(parents[1].getName())
		.getCardinality();

	// compute
	final long inputCardinality = leftCardinality + rightCardinality;
	final double selectivity = computeJoinSelectivity(joinComponent,
		joinCondition, leftCardinality, rightCardinality);

	// setting
	costParams.setCardinality(inputCardinality);
	costParams.setSelectivity(selectivity);
	// *********
    }

    // ***********OperatorComponent***********
    public void setInputParams(OperatorComponent opComp) {
	final CostParams costParams = _compCost.get(opComp.getName());
	final String parentName = opComp.getParents()[0].getName();

	costParams.setCardinality(_compCost.get(parentName).getCardinality());
	costParams.setSelectivity(1);
    }

    // ***********COMMON***********
    // for now only cardinalities
    private void setOutputParams(Component comp) {
	final CostParams costParams = _compCost.get(comp.getName());
	final long currentCardinality = costParams.getCardinality();
	final double selectivity = costParams.getSelectivity();
	final long cardinality = (long) (selectivity * currentCardinality);
	costParams.setCardinality(cardinality);
    }

    public void setOutputParamsAndPar(DataSourceComponent source) {
	setOutputParams(source);

	_parAssigner.setParallelism(source, _compCost);
	_parAssigner.setBatchSize(source, _compCost); // has to go after
	// parallelism
    }

    public void setOutputParamsAndPar(EquiJoinComponent joinComponent) {
	setOutputParams(joinComponent);

	_parAssigner.setParallelism(joinComponent, _compCost);
	_parAssigner.setBatchSize(joinComponent, _compCost); // has to go after
	// setting
	// parallelism
    }

    public void setOutputParamsAndPar(OperatorComponent opComp) {
	setOutputParams(opComp);

	_parAssigner.setParallelism(opComp, _compCost);
	_parAssigner.setBatchSize(opComp, _compCost);
    }

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostParallelismAssigner.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.jsqlparser.schema.Table;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.ImproperParallelismException;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.util.TableAliasName;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.components.EquiJoinComponent;
import ch.epfl.data.squall.components.OperatorComponent;
import ch.epfl.data.squall.utilities.SystemParameters;

public class CostParallelismAssigner {
    // If StormDstTupleStorageJoin is used instead of StormDstJoin, I should set 0.3 
    //    (at least according to the Hyracks SQL plan, in which there is no selections on Date)
    private final static double PARALLELISM_PARENTS = 0.3; // 1.0/8;
    
    /*
     * we need separate class from CostParams, because here we want to order
     * them based on cardinality This class will contain all the parallelism for
     * DataSourceComponents
     */
    private static class OrderedCostParams extends CostParams implements
	    Comparable<OrderedCostParams> {
	/**
		 * 
		 */
	private static final long serialVersionUID = 1L;
	private final String _componentName;

	public OrderedCostParams(String componentName, long cardinality) {
	    _componentName = componentName;
	    setCardinality(cardinality);
	}

	@Override
	public int compareTo(OrderedCostParams t) {
	    final long myCardinality = getCardinality();
	    final long otherCardinality = t.getCardinality();
	    return (new Long(myCardinality)).compareTo(new Long(
		    otherCardinality));
	}

	public String getComponentName() {
	    return _componentName;
	}
    }

    protected final Map _map;
    protected final Schema _schema;

    protected final TableAliasName _tan;
    // computed only once
    protected List<String> _sortedSourceNames;// sorted by increasing

    // cardinalities
    protected Map<String, Integer> _sourcePars;

    public CostParallelismAssigner(Schema schema, TableAliasName tan, Map map) {
	_schema = schema;
	_map = map;
	_tan = tan;
    }

    /*
     * This is done on fake ComponentGenerator, so there is no computeSourcePar
     * parallelism on source components is input variable This method is
     * idempotent, no side effects, can be called multiple times.
     */
    public Map<String, Integer> computeSourcePar(int totalSourcePar) {
	final SQLVisitor pq = ParserUtil.parseQuery(_map);
	final List<Table> tableList = pq.getTableList();
	if (totalSourcePar < tableList.size())
	    throw new RuntimeException(
		    "There is not enought nodes such that all the sources get at least parallelism = 1");
	/*
	 * We need a way to generate parallelism for all the DataSources This
	 * depends on its selectivity/cardinality of each dataSource So we will
	 * generate all the sources witihin a fake sourceCG, and then
	 * proportionally assign parallelism.
	 */
	final NameCompGen sourceCG = new NameCompGen(_schema, _map, this);

	final List<OrderedCostParams> sourceCostParams = new ArrayList<OrderedCostParams>();
	long totalCardinality = 0;
	for (final Table table : tableList) {
	    final DataSourceComponent source = sourceCG
		    .generateDataSource(ParserUtil.getComponentName(table));
	    final String compName = source.getName();
	    final long cardinality = sourceCG.getCostParameters(compName)
		    .getCardinality();
	    totalCardinality += cardinality;
	    sourceCostParams.add(new OrderedCostParams(compName, cardinality));
	}

	/*
	 * Sort by incresing cardinalities, the tables with dblNumNodes = 0 is
	 * assigned 1 and all other proportionally shares the number of nodes We
	 * divide by its output cardinality, because network traffic is the
	 * dominant cost
	 */
	Collections.sort(sourceCostParams);
	int remainingPhysicalNodes = totalSourcePar;
	int remainingLogicalNodes = sourceCostParams.size();
	double remainingCardinality = totalCardinality;
	for (final OrderedCostParams cnc : sourceCostParams) {
	    final long cardinality = cnc.getCardinality();
	    final double ratioNodes = cardinality / remainingCardinality;
	    final double dblNumNodes = ratioNodes * remainingPhysicalNodes;
	    int nodeParallelism = (int) (dblNumNodes + 0.5); // rounding effect
	    // out of the
	    // default
	    // flooring

	    if (nodeParallelism == 0)
		// lower bounds
		nodeParallelism++;
	    if (nodeParallelism + remainingLogicalNodes > remainingPhysicalNodes)
		// upper bound is that all the following sources has at least
		// parallelism = 1
		if (nodeParallelism > 1)
		    nodeParallelism--;
	    if (remainingPhysicalNodes == 0 || nodeParallelism == 0)
		throw new RuntimeException(
			"Not enough nodes, should not be here!");

	    remainingLogicalNodes--;
	    remainingPhysicalNodes -= nodeParallelism;
	    remainingCardinality -= cardinality;

	    // if I am the last guy, I will take all the remaining HW slots
	    if (remainingLogicalNodes == 0)
		nodeParallelism += remainingPhysicalNodes;
	    cnc.setParallelism(nodeParallelism);
	}

	_sortedSourceNames = extractNames(sourceCostParams);
	/*
	 * Now convert it to a Map, so that parallelism for source can be easier
	 * obtained
	 */
	_sourcePars = extractNamesPar(sourceCostParams);
	return _sourcePars;
    }

    /*
     * We take the number of tuples as the upper limit. The real number of
     * distinct hashes may be much smaller, for example when having multiple
     * tuples with the very same hash value. This is rare in practice, in the
     * examples we tried, it occurs only for the final aggregation when last
     * join and final aggregation are not on the same node. In general, it can
     * occur when the join key is not primary key for one of the joined
     * relations, for example when the relationship is n:m and both n,m>0.
     */
    private int estimateDistinctHashes(CostParams leftParentParams,
	    CostParams rightParentParams) {
	/*
	 * TODO: to implement this properly, we need to: - find all the parent
	 * column appearing in joinCondition - column are found by using
	 * ParserUtil.getJSQLColumns(joinCondition) - joinCondition related to
	 * the parents is available in CostOptimizer (obtained
	 * byJoinTableExpr.getExpression(table1, table2)) - check if this column
	 * is the key, or its functional dependency (for example
	 * NATION.NATIONNAME is a functional dependency of NATION.NATIONKEY)
	 */
	final long leftCardinality = leftParentParams.getCardinality();
	final long rightCardinality = rightParentParams.getCardinality();

	long distinctValues = leftCardinality;
	if (distinctValues > rightCardinality)
	    // we return the smaller one
	    distinctValues = rightCardinality;

	if (distinctValues > Integer.MAX_VALUE)
	    return Integer.MAX_VALUE;
	else
	    return (int) distinctValues;

    }

    private int estimateMinParallelism(CostParams leftParentParams,
	    CostParams rightParentParams) {
	final int providedMemory = SystemParameters.getInt(_map,
		"STORAGE_MEMORY_SIZE_MB");
	// inputCardinality tuples need to be stored in memory
	final long inputCardinality = leftParentParams.getCardinality()
		+ rightParentParams.getCardinality();
	final long predictedTotalMemory = (inputCardinality
		* SystemParameters.TUPLE_SIZE_BYTES * SystemParameters.JAVA_OVERHEAD)
		/ SystemParameters.BYTES_IN_MB;
	return (int) (predictedTotalMemory / providedMemory);
    }

    private List<String> extractNames(List<OrderedCostParams> sourceCostParams) {
	final List<String> sortedCompNames = new ArrayList<String>();
	for (final OrderedCostParams cnc : sourceCostParams) {
	    final String compName = cnc.getComponentName();
	    sortedCompNames.add(compName);
	}
	return sortedCompNames;
    }

    private Map<String, Integer> extractNamesPar(
	    List<OrderedCostParams> sourceCostParams) {
	final Map<String, Integer> compParallelism = new HashMap<String, Integer>();
	for (final OrderedCostParams cnc : sourceCostParams) {
	    final String compName = cnc.getComponentName();
	    final int parallelism = cnc.getParallelism();
	    compParallelism.put(compName, parallelism);
	}
	return compParallelism;
    }

    public List<String> getSortedSourceNames() {
	return _sortedSourceNames;
    }

    protected int parallelismFormula(DataSourceComponent source) {
	final String sourceName = source.getName();
	return _sourcePars.get(sourceName);
    }

    protected int parallelismFormula(String compName, CostParams params,
	    CostParams leftParentParams, CostParams rightParentParams) {
	// TODO: this formula does not take into account when joinComponent
	// sends tuples further down
	final double dblParallelism = leftParentParams.getSelectivity()
		* leftParentParams.getParallelism()
		+ rightParentParams.getSelectivity()
		* rightParentParams.getParallelism()
		+ PARALLELISM_PARENTS
		* (leftParentParams.getParallelism() + rightParentParams
			.getParallelism());
	int parallelism = (int) dblParallelism;
	if (parallelism != dblParallelism)
	    // parallelism is ceil of dblParallelism
	    parallelism++;
	return parallelism;
    }

    protected void setBatchSize(DataSourceComponent source,
	    Map<String, CostParams> compCost) {
	// nothing to do
    }

    protected void setBatchSize(EquiJoinComponent joinComponent,
	    Map<String, CostParams> compCost) {
	// nothing to do
    }

    protected void setBatchSize(OperatorComponent operator,
	    Map<String, CostParams> compCost) {
	// nothing to do
    }

    public void setParallelism(DataSourceComponent source,
	    Map<String, CostParams> compCost) {
	if (_sourcePars == null)
	    // if we are here, it was invoked from fake sourceCG, so just return
	    return;

	final String sourceName = source.getName();
	final int parallelism = parallelismFormula(source);
	compCost.get(sourceName).setParallelism(parallelism);
    }

    /*
     * cost-function also idempotent, no changes to `this` changes only compCost
     */
    public void setParallelism(EquiJoinComponent joinComponent,
	    Map<String, CostParams> compCost) {
	final String leftParent = joinComponent.getParents()[0].getName();
	final String rightParent = joinComponent.getParents()[1].getName();

	final String currentCompName = joinComponent.getName();
	final CostParams params = compCost.get(currentCompName);

	final CostParams leftParentParams = compCost.get(leftParent);
	final CostParams rightParentParams = compCost.get(rightParent);

	final int leftParallelism = leftParentParams.getParallelism();
	final int rightParallelism = rightParentParams.getParallelism();

	// compute
	int parallelism = parallelismFormula(currentCompName, params,
		leftParentParams, rightParentParams);

	// lower bound
	final int minParallelism = estimateMinParallelism(leftParentParams,
		rightParentParams);
	if (minParallelism > parallelism)
	    throw new ImproperParallelismException("Component "
		    + currentCompName + " cannot have parallelism LESS than "
		    + minParallelism);

	// upper bound
	final int maxParallelism = estimateDistinctHashes(leftParentParams,
		rightParentParams);
	if (parallelism > maxParallelism)
	    if (leftParallelism == 1 && rightParallelism == 1)
		// if parallelism of both parents is 1, then we should not raise
		// an exception
		// exception serves to force smaller parallelism at sources
		parallelism = maxParallelism;
	    else
		throw new ImproperParallelismException("Component "
			+ currentCompName
			+ " cannot have parallelism MORE than "
			+ maxParallelism);

	// setting
	params.setParallelism(parallelism);

	// we should also check
	// if the sum of all the parallelisms in the subplan
	// is bigger than DIP_NUM_WORKERS (this is set only for PlanRunner).
	// At the time of deciding of parallelism, we are *not* dealing with
	// Storm Config class, but with a plain map.
	// This prevents from reading NUM_WORKERS from Storm Config class.
	// If it works in local mode, it might not work in cluster mode -
	// depending where and when the setting is read.
    }

    /*
     * There could be several algorithms to assign parallelism to opComp: a)
     * square root of parallelism of its parent b) number of distinct groupBy
     * values c) the same as previous level We decided to -if groupBy is a
     * single column, take min(b, c) -otherwise take c
     */
    public void setParallelism(OperatorComponent opComp,
	    Map<String, CostParams> compCost) {
	final Component parent = opComp.getParents()[0];
	final String parentName = parent.getName();
	final int parentPar = compCost.get(parentName).getParallelism();

	int parallelism = parentPar;
	//
	final List<Integer> hashIndexes = parent.getHashIndexes();
	if ((hashIndexes) != null && (hashIndexes.size() == 1)) {
	    final int index = hashIndexes.get(0);
	    final String aliasedColumnName = compCost.get(parentName)
		    .getSchema().getSchema().get(index).getName();
	    final String fullSchemaColumnName = ParserUtil
		    .getFullSchemaColumnName(aliasedColumnName, _tan);

	    try {
		final long distinctValues = _schema
			.getNumDistinctValues(fullSchemaColumnName);
		if (distinctValues < parallelism)
		    parallelism = (int) distinctValues;
	    } catch (final RuntimeException ex) {
	    }
	}

	// cannot be less than 1
	if (parallelism < 1)
	    parallelism = 1;

	// setting
	final String currentComp = opComp.getName();
	compCost.get(currentComp).setParallelism(parallelism);
    }
}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostParams.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.io.Serializable;

import ch.epfl.data.squall.api.sql.util.TupleSchema;

/*
 * parallelism also has to be inside,
 *   we cannot use Config maps to exchange parallelism,
 *   because there are many query plans building in parallel (Selinger-style optimization)
 * From the final choosen query plan, we fill in config maps.
 */
public class CostParams implements Serializable {
    private static final long serialVersionUID = 1L;

    // unless otherwise specified, there is no pruning tuples from a relation
    private double _selectivity = 1.0;
    private long _cardinality; // total number of tuples at the output of a
    // component
    private TupleSchema _schema;
    private int _parallelism;

    // only used in manual batching
    private int _batchSize;
    private double _latency; // in millis
    private double _totalAvgLatency; // in millis

    /**
     * @return the _batchSize
     */
    public int getBatchSize() {
	return _batchSize;
    }

    /**
     * @return the _cardinality
     */
    public long getCardinality() {
	return _cardinality;
    }

    /**
     * @return the _latency
     */
    public double getLatency() {
	return _latency;
    }

    /**
     * @return the _parallelism
     */
    public int getParallelism() {
	return _parallelism;
    }

    /**
     * @return the _schema
     */
    public TupleSchema getSchema() {
	return _schema;
    }

    /**
     * @return the _selectivity
     */
    public double getSelectivity() {
	return _selectivity;
    }

    /**
     * @return the _totalAvgLatency
     */
    public double getTotalAvgLatency() {
	return _totalAvgLatency;
    }

    /**
     * @param batchSize
     *            the _batchSize to set
     */
    public void setBatchSize(int batchSize) {
	_batchSize = batchSize;
    }

    /**
     * @param cardinality
     *            the _cardinality to set
     */
    public void setCardinality(long cardinality) {
	_cardinality = cardinality;
    }

    /**
     * @param latency
     *            the _latency to set
     */
    public void setLatency(double latency) {
	_latency = latency;
    }

    /**
     * @param parallelism
     *            the _parallelism to set
     */
    public void setParallelism(int parallelism) {
	_parallelism = parallelism;
    }

    /**
     * @param schema
     *            the _schema to set
     */
    public void setSchema(TupleSchema schema) {
	_schema = schema;
    }

    /**
     * @param selectivity
     *            the _selectivity to set
     */
    public void setSelectivity(double selectivity) {
	_selectivity = selectivity;
    }

    /**
     * @param totalAvgLatency
     *            the _totalAvgLatency to set
     */
    public void setTotalAvgLatency(double totalAvgLatency) {
	_totalAvgLatency = totalAvgLatency;
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCompGen.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import net.sf.jsqlparser.expression.BinaryExpression;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.Parenthesis;
import net.sf.jsqlparser.expression.operators.conditional.AndExpression;
import net.sf.jsqlparser.expression.operators.conditional.OrExpression;
import net.sf.jsqlparser.statement.select.SelectItem;
import ch.epfl.data.squall.api.sql.optimizers.CompGen;
import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.HierarchyExtractor;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.util.TupleSchema;
import ch.epfl.data.squall.api.sql.visitors.jsql.AndVisitor;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.NameJoinHashVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.NameSelectItemsVisitor;
import ch.epfl.data.squall.api.sql.visitors.squall.NameWhereVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.components.DataSourceComponent;
import ch.epfl.data.squall.components.EquiJoinComponent;
import ch.epfl.data.squall.components.OperatorComponent;
import ch.epfl.data.squall.expressions.ValueExpression;
import ch.epfl.data.squall.operators.AggregateOperator;
import ch.epfl.data.squall.operators.ProjectOperator;
import ch.epfl.data.squall.operators.SelectOperator;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.DeepCopy;
import ch.epfl.data.squall.utilities.SystemParameters;

/*
 * It is necessary that this class operates with Tables,
 *   since we don't want multiple CG sharing the same copy of DataSourceComponent.
 */
public class NameCompGen implements CompGen {
    private final SQLVisitor _pq;

    private final Map _map;
    private final Schema _schema;
    private final String _dataPath;
    private final String _extension;
    private final String _queryName;

    private QueryBuilder _queryBuilder = new QueryBuilder();

    // compName, CostParams for all the components from _queryPlan
    private Map<String, CostParams> _compCost = new HashMap<String, CostParams>();

    private CostEstimator _costEst;
    private CostParallelismAssigner _parAssigner;

    // used for SelectOperator (only from WHERE clause)
    private final Map<String, Expression> _compNamesAndExprs = new HashMap<String, Expression>();
    private final Map<Set<String>, Expression> _compNamesOrExprs = new HashMap<Set<String>, Expression>();

    // used for ProjectOperator (both from SELECT and WHERE clauses)
    private final ProjGlobalCollect _globalCollect;

    // we don't use it, because we have always to do deepCopy because of
    // translateExpr
    // public NameCompGen(Schema schema,
    // SQLVisitor pq,
    // Map map,
    // CostParallelismAssigner parAssigner,
    // Map<String, Expression> compNamesAndExprs,
    // Map<Set<String>, Expression> compNamesOrExprs,
    // ProjGlobalCollect globalCollect){
    // _pq = pq;
    // _map = map;
    // _schema = schema;
    //
    // _dataPath = SystemParameters.getString(map, "DIP_DATA_PATH");
    // _extension = SystemParameters.getString(map, "DIP_EXTENSION");
    //
    // if(parAssigner != null){
    // _parAssigner = parAssigner;
    // _costEst = new CostEstimator(schema, pq, _compCost, parAssigner);
    // }
    //
    // _compNamesAndExprs = compNamesAndExprs;
    // _compNamesOrExprs = compNamesOrExprs;
    //
    // _globalCollect = globalCollect;
    // }

    // CPA initialized in NameCompGenFactory
    public NameCompGen(Schema schema, Map map,
	    CostParallelismAssigner parAssigner) {

	_schema = schema;
	_map = map;

	_pq = ParserUtil.parseQuery(map);
	_dataPath = SystemParameters.getString(map, "DIP_DATA_PATH");
	_extension = SystemParameters.getString(map, "DIP_EXTENSION");
	_queryName = SystemParameters.getString(map, "DIP_QUERY_NAME");

	if (parAssigner != null) {
	    _parAssigner = parAssigner;
	    _costEst = new CostEstimator(_queryName, schema, _pq, _compCost,
		    parAssigner);
	}

	// initializes _compNamesAndExprs and _compNamesOrExprs
	initWhereClause(_pq.getWhereExpr());

	_globalCollect = new ProjGlobalCollect(_pq.getSelectItems(),
		_pq.getWhereExpr());
	_globalCollect.process();
    }

    private void addHash(Component component,
	    List<ValueExpression> hashExpressions) {
	// if joinCondition is a R.A + 5 = S.A, and inputTupleSchema is
	// "R.A + 5", HashExpression is a ColumnReference(0)
	if (ParserUtil.isAllColumnRefs(hashExpressions)) {
	    // all the join conditions are represented through columns, no
	    // ValueExpression
	    // guaranteed that both joined components will have joined columns
	    // visited in the same order
	    // i.e R.A=S.A and R.B=S.B, the columns are (R.A, R.B), (S.A, S.B),
	    // respectively
	    final List<Integer> hashIndexes = ParserUtil
		    .extractColumnIndexes(hashExpressions);

	    // hash indexes in join condition
	    component.setOutputPartKey(hashIndexes);
	} else
	    // hash expressions in join condition
	    component.setHashExpressions(hashExpressions);
    }

    /*************************************************************************************
     * HASH
     *************************************************************************************/

    // set hash for this component, knowing its position in the query plan.
    // Conditions are related only to parents of join,
    // but we have to filter who belongs to my branch in NameJoinHashVisitor.
    // We don't want to hash on something which will be used to join with same
    // later component in the hierarchy.
    private void addJoinHash(Component component, List<Expression> joinCondition) {
	final TupleSchema tupleSchema = _compCost.get(component.getName())
		.getSchema();
	final NameJoinHashVisitor joinOn = new NameJoinHashVisitor(tupleSchema,
		component);
	for (final Expression exp : joinCondition)
	    exp.accept(joinOn);
	final List<ValueExpression> hashExpressions = joinOn.getExpressions();

	addHash(component, hashExpressions);
    }

    /*************************************************************************************
     * Project operator
     *************************************************************************************/
    private void addProjectOperator(Component component) {
	final String compName = component.getName();
	final TupleSchema inputTupleSchema = _compCost.get(compName)
		.getSchema();
	final ProjSchemaCreator psc = new ProjSchemaCreator(_globalCollect,
		inputTupleSchema, component, _pq, _schema);
	psc.create();

	final TupleSchema outputTupleSchema = psc.getOutputSchema();

	if (!ParserUtil.isSameSchema(inputTupleSchema, outputTupleSchema)) {
	    // no need to add projectOperator unless it changes something
	    attachProjectOperator(component, psc.getProjectOperator());
	    processProjectCost(component, outputTupleSchema);
	}
    }

    /*************************************************************************************
     * WHERE clause - SelectOperator
     *************************************************************************************/
    private void addSelectOperator(Component component) {
	final Expression whereCompExpr = createWhereForComponent(component);

	processWhereForComponent(component, whereCompExpr);
	if (_costEst != null)
	    _costEst.processWhereCost(component, whereCompExpr);
    }

    private Expression appendAnd(Expression fullExpr, Expression atomicExpr) {
	if (atomicExpr != null)
	    if (fullExpr != null)
		// appending to previous expressions
		fullExpr = new AndExpression(fullExpr, atomicExpr);
	    else
		// this is the first expression for this component
		fullExpr = atomicExpr;
	return fullExpr;
    }

    private Expression appendOr(Expression fullExpr, Expression atomicExpr) {
	if (atomicExpr != null)
	    if (fullExpr != null)
		// appending to previous expressions
		fullExpr = new OrExpression(fullExpr, atomicExpr);
	    else
		// this is the first expression for this component
		fullExpr = atomicExpr;
	return fullExpr;
    }

    private void attachProjectOperator(Component component,
	    ProjectOperator project) {
	component.add(project);
    }

    private void attachSelectClauseOnLastJoin(Component lastComponent,
	    NameSelectItemsVisitor selectVisitor) {
	final List<AggregateOperator> aggOps = selectVisitor.getAggOps();
	ProjectOperator project = null;
	if (!(selectVisitor.getGroupByVEs() == null || selectVisitor
		.getGroupByVEs().isEmpty()))
	    project = new ProjectOperator(selectVisitor.getGroupByVEs());

	if (aggOps.isEmpty()) {
	    if (project != null)
		lastComponent.add(project);
	} else if (aggOps.size() == 1) {
	    // all the others are group by
	    final AggregateOperator firstAgg = aggOps.get(0);
	    if (project != null)
		firstAgg.setGroupByProjection(project);

	    /*
	     * Avg result cannot be aggregated over multiple nodes. Solution is
	     * one of the following: a) the output of average is keeped in a
	     * form (Sum, Count) and then a user is responsible to aggregate it
	     * over nodes b) if NameTranslator.isSuperset for last join keys and
	     * GroupBy is not fullfilled create new level node with aggregation
	     * as the only operation To be akin to Sum and Count aggregates, we
	     * opted for a)
	     */
	    if (firstAgg.getDistinct() == null)
		lastComponent.add(firstAgg);
	    else
		// in general groupByVEs is not a ColumnReference (it can be an
		// addition, for example).
		// ProjectOperator is not obliged to create schema which fully
		// fits in what FinalAggregation wants
		addHash(lastComponent, selectVisitor.getGroupByVEs());
	} else
	    throw new RuntimeException(
		    "For now only one aggregate function supported!");
    }

    private void attachWhereClause(Component affectedComponent,
	    SelectOperator select) {
	affectedComponent.add(select);
    }

    private DataSourceComponent createAddDataSource(String tableCompName) {
	final String tableSchemaName = _pq.getTan()
		.getSchemaName(tableCompName);
	final String sourceFile = tableSchemaName.toLowerCase();

	final DataSourceComponent relation = new DataSourceComponent(
		tableCompName, _dataPath + sourceFile + _extension);
	_queryBuilder.add(relation);
	return relation;
    }

    private EquiJoinComponent createAndAddEquiJoin(Component left,
	    Component right) {
	final EquiJoinComponent joinComponent = new EquiJoinComponent(left,
		right);
	_queryBuilder.add(joinComponent);

	return joinComponent;
    }

    private OperatorComponent createAndAddOperatorComp(Component lastComponent) {
	final OperatorComponent opComp = new OperatorComponent(lastComponent,
		ParserUtil.generateUniqueName("OPERATOR"));
	_queryBuilder.add(opComp);

	return opComp;
    }

    /*
     * Setting schema for DataSourceComponent
     */
    private void createCompCost(DataSourceComponent source) {
	final String compName = source.getName();
	final String schemaName = _pq.getTan().getSchemaName(compName);
	final CostParams costParams = new CostParams();

	// schema is consisted of TableAlias.columnName
	costParams.setSchema(ParserUtil.createAliasedSchema(
		_schema.getTableSchema(schemaName), compName));

	_compCost.put(compName, costParams);
    }

    /*
     * This can estimate selectivity/cardinality of a join between between any
     * two components but with a restriction - rightParent has only one
     * component mentioned in joinCondition. If connection between any
     * components is allowed, we have to find a way combining multiple distinct
     * selectivities (for example having a component R-S and T-V, how to combine
     * R.A=T.A and S.B=V.B?) This method is based on usual way to join tables -
     * on their appropriate keys. It works for cyclic queries as well (TPCH5 is
     * an example).
     */
    private void createCompCost(EquiJoinComponent joinComponent) {
	// create schema and selectivity wrt leftParent
	final String compName = joinComponent.getName();
	final CostParams costParams = new CostParams();

	// *********set schema
	final TupleSchema schema = ParserUtil.joinSchema(
		joinComponent.getParents(), _compCost);
	costParams.setSchema(schema);

	_compCost.put(compName, costParams);
    }

    private void createCompCost(OperatorComponent opComp) {
	final String compName = opComp.getName();
	final CostParams costParams = new CostParams();

	// *********set schema
	final TupleSchema schema = _compCost.get(
		opComp.getParents()[0].getName()).getSchema();
	costParams.setSchema(schema);

	_compCost.put(compName, costParams);
    }

    /*
     * Merging atomicExpr and orExpressions corresponding to this component
     */
    private Expression createWhereForComponent(Component component) {
	Expression expr = _compNamesAndExprs.get(component.getName());

	for (final Map.Entry<Set<String>, Expression> orEntry : _compNamesOrExprs
		.entrySet()) {
	    final Set<String> orCompNames = orEntry.getKey();

	    // TODO-PRIO: the full solution would be that OrExpressions are
	    // split into subexpressions
	    // which might be executed on their LCM
	    // Not implemented because it's quite rare - only TPCH7
	    // Even in TPCH7 there is no need for multiple LCM.
	    // TODO-PRIO: selectivityEstimation for pushing OR need to be
	    // improved
	    final Expression orExpr = orEntry.getValue();
	    if (HierarchyExtractor.isLCM(component, orCompNames))
		expr = appendAnd(expr, orExpr);
	    else if (component instanceof DataSourceComponent) {
		final DataSourceComponent source = (DataSourceComponent) component;
		final Expression addedExpr = getMineSubset(source, orExpr);
		expr = appendAnd(expr, addedExpr);
	    }
	}
	return expr;
    }

    /*
     * Used in CostOptimizer when different plans are possible from the same
     * subplan main reason is translateExpr method - synonyms in NameTranslator
     */
    public NameCompGen deepCopy() {
	// map, schema, dataPath, dataExt are shared because they are constants
	// all the time
	// parAssigner is computed once in NameCompGenFactory and then can be
	// shared

	// pq, globalProject, compNamesAndExprs, compNamesOrExprs are created
	// from scratch in the constructor
	// ideally, this should be deep-copied, because it can be changed due to
	// NameTranslator.synonims
	// not possible because JSQL is not serializable
	// but this is only matter of performance
	final NameCompGen copy = new NameCompGen(_schema, _map, _parAssigner);

	// the rest needs to be explicitly deep-copied
	copy._compCost = (Map<String, CostParams>) DeepCopy.copy(_compCost);

	// _compCost from Estimator and from NCG has to be the same reference
	copy._costEst = new CostEstimator(_queryName, copy._schema, copy._pq,
		copy._compCost, copy._parAssigner);

	copy._queryBuilder = (QueryBuilder) DeepCopy.copy(_queryBuilder);
	return copy;
    }

    /*
     * adding a DataSourceComponent to the list of components
     */
    @Override
    public DataSourceComponent generateDataSource(String tableCompName) {
	final DataSourceComponent source = createAddDataSource(tableCompName);

	createCompCost(source);
	if (_costEst != null)
	    _costEst.setInputParams(source);

	// operators
	addSelectOperator(source);
	addProjectOperator(source);

	// For single-dataSource plans (such as TPCH6)
	NameSelectItemsVisitor nsiv = null;
	if (ParserUtil.isFinalComponent(source, _pq)) {
	    // final component in terms of joins
	    nsiv = getFinalSelectVisitor(source);
	    attachSelectClauseOnLastJoin(source, nsiv);
	}

	if (_costEst != null)
	    _costEst.setOutputParamsAndPar(source);

	// we have to create newComponent after processing statistics of the
	// joinComponent
	if (ParserUtil.isFinalComponent(source, _pq))
	    generateOperatorComp(source, nsiv);

	return source;
    }

    /*
     * Join between two components List<Expression> is a set of join conditions
     * between two components.
     */
    @Override
    public EquiJoinComponent generateEquiJoin(Component left, Component right) {
	final EquiJoinComponent joinComponent = createAndAddEquiJoin(left,
		right);

	// compute join condition
	final List<Expression> joinCondition = ParserUtil.getJoinCondition(_pq,
		left, right);
	if (joinCondition == null)
	    throw new RuntimeException(
		    "There is no join conditition between components "
			    + left.getName() + " and " + right.getName());

	// set hashes for two parents, has to be before createCompCost
	addJoinHash(left, joinCondition);
	addJoinHash(right, joinCondition);

	createCompCost(joinComponent);
	if (_costEst != null)
	    _costEst.setInputParams(joinComponent, joinCondition);

	// operators
	addSelectOperator(joinComponent);

	// TODO when single last component: decomment when NSIV.visit(Column) is
	// fixed
	// - issue in TPCH9
	// if(!ParserUtil.isFinalJoin(joinComponent, _pq)){
	addProjectOperator(joinComponent);
	// assume no operators between projection and final aggregation
	// final aggregation is able to do projection in GroupByProjection
	// }

	NameSelectItemsVisitor nsiv = null;
	if (ParserUtil.isFinalComponent(joinComponent, _pq)) {
	    // final component in terms of joins
	    nsiv = getFinalSelectVisitor(joinComponent);
	    attachSelectClauseOnLastJoin(joinComponent, nsiv);
	}

	if (_costEst != null)
	    _costEst.setOutputParamsAndPar(joinComponent);

	// we have to create newComponent after processing statistics of the
	// joinComponent
	if (ParserUtil.isFinalComponent(joinComponent, _pq))
	    generateOperatorComp(joinComponent, nsiv);

	return joinComponent;
    }

    private OperatorComponent generateOperatorComp(Component lastComponent,
	    NameSelectItemsVisitor selectVisitor) {
	final List<AggregateOperator> aggOps = selectVisitor.getAggOps();
	if (aggOps.size() != 1)
	    return null;
	OperatorComponent opComp = null;

	// projectOperator is already set to firstAgg in attachLastJoin method
	// if we decide to do construct new NSIV, then projectOperator has to be
	// set as well
	final AggregateOperator firstAgg = aggOps.get(0);

	// Setting new level of components is only necessary for distinct in
	// aggregates
	if (firstAgg.getDistinct() != null) {
	    opComp = createAndAddOperatorComp(lastComponent);

	    createCompCost(opComp);
	    if (_costEst != null)
		_costEst.setInputParams(opComp);

	    // we can use the same firstAgg, because we no tupleSchema change
	    // occurred after LAST_COMPONENT:FinalAgg and NEW_COMPONENT:FinalAgg
	    // Namely, NEW_COMPONENT has only FinalAgg operator
	    opComp.add(firstAgg);

	    if (_costEst != null)
		_costEst.setOutputParamsAndPar(opComp);
	}

	return opComp;
    }

    public Map<String, CostParams> getCompCost() {
	return _compCost;
    }

    public CostParams getCostParameters(String componentName) {
	return _compCost.get(componentName);
    }

    /*************************************************************************************
     * SELECT clause - Final aggregation
     *************************************************************************************/
    private NameSelectItemsVisitor getFinalSelectVisitor(Component lastComponent) {
	final TupleSchema tupleSchema = _compCost.get(lastComponent.getName())
		.getSchema();
	final NameSelectItemsVisitor selectVisitor = new NameSelectItemsVisitor(
		tupleSchema, _map, lastComponent);
	for (final SelectItem elem : _pq.getSelectItems())
	    elem.accept(selectVisitor);
	return selectVisitor;
    }

    /*
     * get a list of WhereExpressions (connected by OR) belonging to source For
     * example (N1.NATION = FRANCE AND N2.NATION = GERMANY) OR (N1.NATION =
     * GERMANY AND N2.NATION = FRANCE) returns N1.NATION = FRANCE OR N1.NATION =
     * GERMANY
     */
    public Expression getMineSubset(DataSourceComponent source, Expression expr) {
	final List<String> compNames = ParserUtil
		.getCompNamesFromColumns(ParserUtil.getJSQLColumns(expr));

	boolean mine = true;
	for (final String compName : compNames)
	    if (!compName.equals(source.getName())) {
		mine = false;
		break;
	    }

	if (mine)
	    return expr;

	Expression result = null;
	if (expr instanceof OrExpression || expr instanceof AndExpression) {
	    final BinaryExpression be = (BinaryExpression) expr;
	    result = appendOr(result,
		    getMineSubset(source, be.getLeftExpression()));
	    result = appendOr(result,
		    getMineSubset(source, be.getRightExpression()));
	} else if (expr instanceof Parenthesis) {
	    final Parenthesis prnth = (Parenthesis) expr;
	    result = getMineSubset(source, prnth.getExpression());
	}

	// whatever is not fully recognized (all the compNames = source), and is
	// not And or Or, returns null
	return result;
    }

    @Override
    public QueryBuilder getQueryBuilder() {
	return _queryBuilder;
    }

    @Override
    public List<Component> getSubPlans() {
	throw new RuntimeException("Should not be invoked for lefty plans!");
    }

    private void initWhereClause(Expression whereExpr) {
	if (whereExpr == null)
	    return;

	final AndVisitor andVisitor = new AndVisitor();
	whereExpr.accept(andVisitor);
	final List<Expression> atomicAndExprs = andVisitor.getAtomicExprs();
	final List<OrExpression> orExprs = andVisitor.getOrExprs();

	/*
	 * we have to group atomicExpr (conjunctive terms) by ComponentName
	 * there might be multiple columns from a single DataSourceComponent,
	 * and we want to group them conditions such as R.A + R.B = 10 are
	 * possible not possible to have ColumnReference from multiple tables,
	 * because than it would be join condition
	 */
	ParserUtil.addAndExprsToComps(_compNamesAndExprs, atomicAndExprs);
	ParserUtil.addOrExprsToComps(_compNamesOrExprs, orExprs);
    }

    private void processProjectCost(Component component,
	    TupleSchema outputTupleSchema) {
	// only schema is changed
	final String compName = component.getName();
	_compCost.get(compName).setSchema(outputTupleSchema);
    }

    /*
     * whereCompExpression is the part of WHERE clause which refers to
     * affectedComponent This is the only method in this class where
     * IndexWhereVisitor is actually instantiated and invoked SelectOperator is
     * able to deal with ValueExpressions (and not only with ColumnReferences),
     * but here we recognize JSQL expressions here which can be built of
     * inputTupleSchema (constants included)
     */
    private void processWhereForComponent(Component affectedComponent,
	    Expression whereCompExpr) {
	if (whereCompExpr != null) {
	    // first get the current schema of the component
	    final TupleSchema tupleSchema = _compCost.get(
		    affectedComponent.getName()).getSchema();
	    final NameWhereVisitor whereVisitor = new NameWhereVisitor(
		    tupleSchema, affectedComponent);
	    whereCompExpr.accept(whereVisitor);
	    attachWhereClause(affectedComponent,
		    whereVisitor.getSelectOperator());
	}
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCompGenFactory.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.Map;

import ch.epfl.data.squall.api.sql.schema.Schema;
import ch.epfl.data.squall.api.sql.util.TableAliasName;

/*
 * It generates different NameCompGen for each partial query plan
 *   NameCompGen is responsible for attaching operators to components
 * Aggregation only on the last level.
 */
public class NameCompGenFactory {
    private final Schema _schema;
    private final Map _map; // map is updates in place
    private final TableAliasName _tan;

    private CostParallelismAssigner _parAssigner;

    /*
     * only plan, no parallelism
     */
    public NameCompGenFactory(Map map, TableAliasName tan) {
	_map = map;
	_tan = tan;

	_schema = new Schema(map);
    }

    /*
     * generating plan + parallelism
     */
    public NameCompGenFactory(Map map, TableAliasName tan, int totalSourcePar) {
	this(map, tan);
	setParAssignerMode(totalSourcePar);
    }

    public NameCompGen create() {
	return new NameCompGen(_schema, _map, _parAssigner);
    }

    public CostParallelismAssigner getParAssigner() {
	return _parAssigner;
    }

    public final void setParAssignerMode(int totalSourcePar) {
	// in general there might be many NameComponentGenerators,
	// that's why CPA is computed before of NCG
	_parAssigner = new CostParallelismAssigner(_schema, _tan, _map);

	// for the same _parAssigner, we might try with different totalSourcePar
	_parAssigner.computeSourcePar(totalSourcePar);
    }

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCostOptimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.log4j.Logger;

import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.util.ImproperParallelismException;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

/*
 * For lefty plans, parallelism obtained from cost formula
 */
public class NameCostOptimizer implements Optimizer {
    private static Logger LOG = Logger.getLogger(NameCostOptimizer.class);

    private final SQLVisitor _pq;
    private final Map _map;

    public NameCostOptimizer(Map map) {
	_map = map;
	_pq = ParserUtil.parseQuery(map);
    }

    private void addEquiJoinNotSuboptimal(Component firstComp,
	    Component secondComp, NameCompGen ncg, List<NameCompGen> listNcg) {

	boolean isExc = false;
	try {
	    ncg.generateEquiJoin(firstComp, secondComp);
	} catch (final ImproperParallelismException exc) {
	    final StringBuilder errorMsg = new StringBuilder();
	    errorMsg.append(
		    "This subplan will never generated the optimal query plan, so it's thrown:")
		    .append("\n");
	    errorMsg.append(exc.getMessage()).append("\n");
	    LOG.info(errorMsg.toString());
	    isExc = true;
	}
	if (!isExc)
	    // if this subplan is somewhat suboptimal, it's not added to the
	    // list
	    listNcg.add(ncg);
    }

    /*
     * best is the one with the smallest total nodes used
     */
    private NameCompGen chooseBest(List<NameCompGen> ncgList) {
	if (ncgList.isEmpty()) {
	    final String errorMsg = "No query plans can be efficiently executed with specified parallelisms.\n"
		    + "Try to reduce DIP_TOTAL_SRC_PAR in config file.";
	    LOG.info(errorMsg);
	    System.exit(1);
	}

	final int index = getMinTotalParIndex(ncgList);
	return ncgList.get(index);
    }

    @Override
    public QueryBuilder generate() {
	final int totalSourcePar = SystemParameters.getInt(_map,
		"DIP_TOTAL_SRC_PAR");
	final NameCompGenFactory factory = new NameCompGenFactory(_map,
		_pq.getTan(), totalSourcePar);
	final List<String> sourceNames = factory.getParAssigner()
		.getSortedSourceNames();
	final int numSources = sourceNames.size();
	NameCompGen optimal = null;

	// **************creating single-relation plans********************
	if (numSources == 1) {
	    optimal = factory.create();
	    optimal.generateDataSource(sourceNames.get(0));
	}

	// **************creating 2-way joins********************
	List<NameCompGen> ncgListFirst = new ArrayList<NameCompGen>();
	for (int i = 0; i < numSources; i++) {
	    final String firstCompName = sourceNames.get(i);
	    final List<String> joinedWith = _pq.getJte()
		    .getJoinedWithSingleDir(firstCompName);
	    if (joinedWith != null)
		for (final String secondCompName : joinedWith) {
		    final NameCompGen ncg = factory.create();
		    final Component first = ncg
			    .generateDataSource(firstCompName);
		    final Component second = ncg
			    .generateDataSource(secondCompName);
		    addEquiJoinNotSuboptimal(first, second, ncg, ncgListFirst);
		}
	}
	if (numSources == 2)
	    optimal = chooseBest(ncgListFirst);

	// **************creating multi-way joins********************
	for (int level = 2; level < numSources; level++) {
	    List<NameCompGen> ncgListSecond = new ArrayList<NameCompGen>();
	    for (int i = 0; i < ncgListFirst.size(); i++) {
		final NameCompGen ncg = ncgListFirst.get(i);
		Component firstComp = ncg.getQueryBuilder().getLastComponent();
		final List<String> ancestors = ParserUtil
			.getSourceNameList(firstComp);
		final List<String> joinedWith = _pq.getJte().getJoinedWith(
			ancestors);
		for (final String compName : joinedWith) {
		    NameCompGen newNcg = ncg;
		    if (joinedWith.size() > 1) {
			// doing deepCopy only if there are multiple tables to
			// be joined with
			newNcg = ncg.deepCopy();
			firstComp = newNcg.getQueryBuilder().getLastComponent();
		    }

		    final Component secondComp = newNcg
			    .generateDataSource(compName);
		    addEquiJoinNotSuboptimal(firstComp, secondComp, newNcg,
			    ncgListSecond);
		}
	    }

	    if (level == numSources - 1)
		// last level, chooseOptimal
		optimal = chooseBest(ncgListSecond);
	    else
		// filtering - for NCGs with the same ancestor set, choose the
		// one with the smallest totalParallelism
		ncgListSecond = pruneSubplans(ncgListSecond);

	    ncgListFirst = ncgListSecond;
	}

	ParserUtil.parallelismToMap(optimal, _map);

	return optimal.getQueryBuilder();
    }

    private int getMinTotalPar(List<NameCompGen> ncgList) {
	final int minParIndex = getMinTotalParIndex(ncgList);
	return ParserUtil.getTotalParallelism(ncgList.get(minParIndex));
    }

    private int getMinTotalParIndex(List<NameCompGen> ncgList) {
	int totalPar = ParserUtil.getTotalParallelism(ncgList.get(0));
	int minParIndex = 0;
	for (int i = 1; i < ncgList.size(); i++) {
	    final int currentTotalPar = ParserUtil.getTotalParallelism(ncgList
		    .get(i));
	    if (currentTotalPar < totalPar) {
		minParIndex = i;
		totalPar = currentTotalPar;
	    }
	}
	return minParIndex;
    }

    private List<NameCompGen> pruneSubplans(List<NameCompGen> ncgList) {
	final Map<Set<String>, List<NameCompGen>> collection = new HashMap<Set<String>, List<NameCompGen>>();

	// filling in the collection with the appropriate key-value structure
	for (final NameCompGen ncg : ncgList) {
	    final Set<String> ancestors = ParserUtil.getSourceNameSet(ncg
		    .getQueryBuilder().getLastComponent());
	    ParserUtil.addToCollection(ancestors, ncg, collection);
	}

	final List<NameCompGen> pruned = new ArrayList<NameCompGen>();
	// for each key(which is set of ancestors) choose only the best one
	for (final Map.Entry<Set<String>, List<NameCompGen>> entrySet : collection
		.entrySet()) {
	    final List<NameCompGen> valueList = entrySet.getValue();

	    // all the equivalent plans having minimum totalParallelism are
	    // added
	    // there might be muptiple of them
	    final int minTotalPar = getMinTotalPar(valueList);
	    for (final NameCompGen ncg : valueList) {
		final int totalPar = ParserUtil.getTotalParallelism(ncg);
		if (totalPar == minTotalPar)
		    pruned.add(ncg);
	    }
	}
	return pruned;
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameManualOptimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

/*
 * For lefty plans, parallelism obtained from cost formula
 */
public class NameManualOptimizer implements Optimizer {
    private final Map _map;
    private final SQLVisitor _pq;

    private final List<String> _compNames = new ArrayList<String>(); // all the

    // sources in
    // the
    // appropriate
    // order

    public NameManualOptimizer(Map map) {
	_map = map;
	_pq = ParserUtil.parseQuery(map);

	parse();
    }

    @Override
    public QueryBuilder generate() {
	final int totalParallelism = SystemParameters.getInt(_map,
		"DIP_TOTAL_SRC_PAR");
	final NameCompGenFactory factory = new NameCompGenFactory(_map,
		_pq.getTan(), totalParallelism);
	final NameCompGen ncg = factory.create();

	Component first = ncg.generateDataSource(_compNames.get(0));
	for (int i = 1; i < _compNames.size(); i++) {
	    final Component second = ncg.generateDataSource(_compNames.get(i));
	    first = ncg.generateEquiJoin(first, second);
	}

	ParserUtil.parallelismToMap(ncg, _map);

	return ncg.getQueryBuilder();
    }

    // HELPER methods
    private void parse() {
	final String plan = SystemParameters.getString(_map, "DIP_PLAN");
	final String[] components = plan.split(",");

	_compNames.addAll(Arrays.asList(components));
    }

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameManualParOptimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

/*
 * For lefty plans with explicitly specified parallelism
 */
public class NameManualParOptimizer implements Optimizer {
    private final Map _map;
    private final SQLVisitor _pq;

    private final List<String> _compNames = new ArrayList<String>(); // all the
    // sources in
    // the
    // appropriate
    // order
    private final Map<String, Integer> _compNamePar = new HashMap<String, Integer>(); // all

    // components(including
    // joins)
    // with
    // its
    // parallelism

    public NameManualParOptimizer(Map map) {
	_map = map;
	_pq = ParserUtil.parseQuery(map);

	try {
	    parse();
	} catch (final ArrayIndexOutOfBoundsException a) {
	    throw new RuntimeException(
		    "Invalid DIP_PLAN setting in config file!");
	}
    }

    @Override
    public QueryBuilder generate() {
	final NameCompGenFactory factory = new NameCompGenFactory(_map,
		_pq.getTan());
	final NameCompGen ncg = factory.create();

	Component first = ncg.generateDataSource(_compNames.get(0));
	for (int i = 1; i < _compNames.size(); i++) {
	    final Component second = ncg.generateDataSource(_compNames.get(i));
	    first = ncg.generateEquiJoin(first, second);
	}

	ParserUtil.parallelismToMap(_compNamePar, _map);

	return ncg.getQueryBuilder();
    }

    // HELPER methods
    private void parse() {
	final String plan = SystemParameters.getString(_map, "DIP_PLAN");
	final String[] components = plan.split(",");

	final String firstComponent = components[0];
	final String[] firstParts = firstComponent.split(":");
	String firstCompName = firstParts[0];
	final int firstParallelism = Integer.valueOf(firstParts[1]);

	putSource(firstCompName, firstParallelism);

	for (int i = 1; i < components.length; i++) {
	    final String secondComponent = components[i];
	    final String[] secondParts = secondComponent.split(":");
	    final String secondCompName = secondParts[0];
	    final int secondPar = Integer.valueOf(secondParts[1]);
	    final int secondJoinPar = Integer.valueOf(secondParts[2]);
	    putSource(secondCompName, secondPar);
	    final String joinCompName = firstCompName + "_" + secondCompName;
	    putJoin(joinCompName, secondJoinPar);
	    firstCompName = joinCompName;
	}
    }

    private void putJoin(String compName, int par) {
	_compNamePar.put(compName, par);
    }

    private void putSource(String compName, int par) {
	_compNames.add(compName);
	_compNamePar.put(compName, par);
    }

}


================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameRuleOptimizer.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl.data.squall.api.sql.optimizers.name;

import java.util.List;
import java.util.Map;

import ch.epfl.data.squall.api.sql.optimizers.Optimizer;
import ch.epfl.data.squall.api.sql.util.ParserUtil;
import ch.epfl.data.squall.api.sql.visitors.jsql.SQLVisitor;
import ch.epfl.data.squall.components.Component;
import ch.epfl.data.squall.query_plans.QueryBuilder;
import ch.epfl.data.squall.utilities.SystemParameters;

/*
 * For lefty plans, parallelism obtained from cost formula
 */
public class NameRuleOptimizer implements Optimizer {
    private final Map _map;
    private final SQLVisitor _pq;

    public NameRuleOptimizer(Map map) {
	_map = map;
	_pq = ParserUtil.parseQuery(map);
    }

    /*
     * Take last component(LC) from ncg, and remove the Source with the smallest
     * cardinality which can be joined with LC. This method has side effects:
     * removing from sourceNames collection
     */
    private String chooseSmallestSource(Component lastComp,
	    List<String> sourceNames) {
	for (int i = 0; i < sourceNames.size(); i++) {
	    final String candidateComp = sourceNames.get(i);
	    if (_pq.getJte().joinExistsBetween(candidateComp,
		    ParserUtil.getSourceNameList(lastComp))) {
		sourceNames.remove(i);
		return candidateComp;
	    }
	}
	throw new RuntimeException(
		"Should not be here! No components to join with!");
    }

    @Override
    public QueryBuilder generate() {
	final int totalParallelism = SystemParameters.getInt(_map,
		"DIP_TOTAL_SRC_PAR");
	final NameCompGenFactory factory = new NameCompGenFactory(_map,
		_pq.getTan(), totalParallelism);

	// sorted by increasing cardinalities
	final List<String> sourceNames = factory.getParAssigner()
		.getSortedSourceNames();

	final NameCompGen ncg = factory.create();

	Component first = ncg.generateDataSource(sourceNames.remove(0));
	final int numSources = sourceNames.size(); // first component is already
	// removed
	for (int i = 0; i < numSources; i++) {
	    final String secondStr = chooseSmallestSource(first, sourceNames);
	    final Component second = ncg.generateDataSource(secondStr);
	    first = ncg.generateEquiJoin(first, second);
	}

	ParserUtil.parallelismToMap(ncg, _map);

	return ncg.getQueryBuilder();
    }

}

================================================
FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameTranslator.java
================================================
/*
 * Copyright (c) 2011-2015 EPFL DATA Laboratory
 * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)
 *
 * All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package ch.epfl
Download .txt
gitextract_4ylla6p_/

├── .gitignore
├── .travis.yml
├── LICENSE
├── NOTICE
├── README.markdown
├── bin/
│   ├── install.sh
│   ├── recompile.sh
│   ├── squall_cluster.sh
│   ├── squall_local.sh
│   └── storm_env.sh
├── build.sbt
├── contrib/
│   ├── bheaven-0.0.3.jar
│   ├── storm-graphite-0.2.4-SNAPSHOT-all.jar
│   └── ujmp-complete-0.2.5.jar
├── project/
│   ├── build.properties
│   └── plugins.sbt
├── squall-core/
│   └── src/
│       ├── main/
│       │   └── java/
│       │       └── ch/
│       │           └── epfl/
│       │               └── data/
│       │                   └── squall/
│       │                       ├── api/
│       │                       │   └── sql/
│       │                       │       ├── estimators/
│       │                       │       │   ├── ConfigSelectivityEstimator.java
│       │                       │       │   ├── HardCodedSelectivities.java
│       │                       │       │   ├── JSQLTypeConverter.java
│       │                       │       │   ├── SelectivityEstimator.java
│       │                       │       │   └── SelingerSelectivityEstimator.java
│       │                       │       ├── main/
│       │                       │       │   └── ParserMain.java
│       │                       │       ├── optimizers/
│       │                       │       │   ├── CompGen.java
│       │                       │       │   ├── Optimizer.java
│       │                       │       │   ├── index/
│       │                       │       │   │   ├── CompLevel.java
│       │                       │       │   │   ├── EarlyProjection.java
│       │                       │       │   │   ├── IndexCompGen.java
│       │                       │       │   │   ├── IndexRuleOptimizer.java
│       │                       │       │   │   ├── IndexSimpleOptimizer.java
│       │                       │       │   │   ├── IndexTranslator.java
│       │                       │       │   │   ├── LevelAssigner.java
│       │                       │       │   │   ├── RuleParallelismAssigner.java
│       │                       │       │   │   └── TableSelector.java
│       │                       │       │   └── name/
│       │                       │       │       ├── CostEstimator.java
│       │                       │       │       ├── CostParallelismAssigner.java
│       │                       │       │       ├── CostParams.java
│       │                       │       │       ├── NameCompGen.java
│       │                       │       │       ├── NameCompGenFactory.java
│       │                       │       │       ├── NameCostOptimizer.java
│       │                       │       │       ├── NameManualOptimizer.java
│       │                       │       │       ├── NameManualParOptimizer.java
│       │                       │       │       ├── NameRuleOptimizer.java
│       │                       │       │       ├── NameTranslator.java
│       │                       │       │       ├── ProjGlobalCollect.java
│       │                       │       │       ├── ProjSchemaCreator.java
│       │                       │       │       └── manual_batching/
│       │                       │       │           ├── ClusterConstants.java
│       │                       │       │           ├── ManualBatchingCompGenFactory.java
│       │                       │       │           ├── ManualBatchingOptimizer.java
│       │                       │       │           └── ManualBatchingParallelismAssigner.java
│       │                       │       ├── schema/
│       │                       │       │   ├── ColumnNameType.java
│       │                       │       │   ├── Schema.java
│       │                       │       │   └── parser/
│       │                       │       │       ├── ParseException.java
│       │                       │       │       ├── SchemaParser.java
│       │                       │       │       ├── SchemaParserConstants.java
│       │                       │       │       ├── SchemaParserTokenManager.java
│       │                       │       │       ├── SimpleCharStream.java
│       │                       │       │       ├── Token.java
│       │                       │       │       └── TokenMgrError.java
│       │                       │       ├── util/
│       │                       │       │   ├── HierarchyExtractor.java
│       │                       │       │   ├── ImproperParallelismException.java
│       │                       │       │   ├── JoinTablesExprs.java
│       │                       │       │   ├── NotFromMyBranchException.java
│       │                       │       │   ├── ParserUtil.java
│       │                       │       │   ├── TableAliasName.java
│       │                       │       │   └── TupleSchema.java
│       │                       │       └── visitors/
│       │                       │           ├── jsql/
│       │                       │           │   ├── AndVisitor.java
│       │                       │           │   ├── ColumnCollectVisitor.java
│       │                       │           │   ├── JoinTablesExprsVisitor.java
│       │                       │           │   ├── MaxSubExpressionsVisitor.java
│       │                       │           │   ├── PrintVisitor.java
│       │                       │           │   └── SQLVisitor.java
│       │                       │           └── squall/
│       │                       │               ├── ColumnRefCollectVisitor.java
│       │                       │               ├── IndexJoinHashVisitor.java
│       │                       │               ├── IndexSelectItemsVisitor.java
│       │                       │               ├── IndexWhereVisitor.java
│       │                       │               ├── NameJoinHashVisitor.java
│       │                       │               ├── NameProjectVisitor.java
│       │                       │               ├── NameSelectItemsVisitor.java
│       │                       │               ├── NameWhereVisitor.java
│       │                       │               ├── VECollectPredVisitor.java
│       │                       │               └── VECollectVisitor.java
│       │                       ├── components/
│       │                       │   ├── AbstractComponent.java
│       │                       │   ├── AbstractJoinerComponent.java
│       │                       │   ├── Component.java
│       │                       │   ├── ComponentProperties.java
│       │                       │   ├── DataSourceComponent.java
│       │                       │   ├── EquiJoinComponent.java
│       │                       │   ├── JoinerComponent.java
│       │                       │   ├── OperatorComponent.java
│       │                       │   ├── hyper_cube/
│       │                       │   │   ├── HyperCubeJoinComponent.java
│       │                       │   │   └── HyperCubeJoinComponentFactory.java
│       │                       │   └── theta/
│       │                       │       ├── AdaptiveThetaJoinComponent.java
│       │                       │       ├── ThetaJoinComponent.java
│       │                       │       └── ThetaJoinComponentFactory.java
│       │                       ├── connectors/
│       │                       │   └── hdfs/
│       │                       │       └── HDFSmaterializer.java
│       │                       ├── ewh/
│       │                       │   ├── algorithms/
│       │                       │   │   ├── BSPAlgorithm.java
│       │                       │   │   ├── DenseMonotonicWeightPrecomputation.java
│       │                       │   │   ├── DenseWeightPrecomputation.java
│       │                       │   │   ├── InputOutputShallowCoarsener.java
│       │                       │   │   ├── InputShallowCoarsener.java
│       │                       │   │   ├── MCMCRandomWalkAlgorithm.java
│       │                       │   │   ├── OkcanAlgorithm.java
│       │                       │   │   ├── OkcanCandidateCoarsener.java
│       │                       │   │   ├── OkcanCandidateInputAlgorithm.java
│       │                       │   │   ├── OkcanCandidateOutputAlgorithm.java
│       │                       │   │   ├── OkcanCoarsener.java
│       │                       │   │   ├── OkcanExactCoarsener.java
│       │                       │   │   ├── OkcanExactInputAlgorithm.java
│       │                       │   │   ├── OkcanExactOutputAlgorithm.java
│       │                       │   │   ├── OutputShallowCoarsener.java
│       │                       │   │   ├── PWeightPrecomputation.java
│       │                       │   │   ├── ShallowCoarsener.java
│       │                       │   │   ├── TilingAlgorithm.java
│       │                       │   │   ├── WeightPrecomputation.java
│       │                       │   │   └── optimality/
│       │                       │   │       ├── MaxAvgOptimality.java
│       │                       │   │       ├── OptimalityMetricInterface.java
│       │                       │   │       └── WeightFunction.java
│       │                       │   ├── components/
│       │                       │   │   ├── DummyComponent.java
│       │                       │   │   ├── EWHSampleMatrixComponent.java
│       │                       │   │   ├── EquiDepthHistogramComponent.java
│       │                       │   │   └── OkcanSampleMatrixComponent.java
│       │                       │   ├── data_structures/
│       │                       │   │   ├── BooleanRegions.java
│       │                       │   │   ├── ExtremePositions.java
│       │                       │   │   ├── FixedSizePriorityQueue.java
│       │                       │   │   ├── FrequencyPosition.java
│       │                       │   │   ├── JoinMatrix.java
│       │                       │   │   ├── KeyPriorityProbability.java
│       │                       │   │   ├── KeyRegion.java
│       │                       │   │   ├── ListAdapter.java
│       │                       │   │   ├── ListJavaGeneric.java
│       │                       │   │   ├── ListTIntAdapter.java
│       │                       │   │   ├── ListTLongAdapter.java
│       │                       │   │   ├── MatrixIntInt.java
│       │                       │   │   ├── NumOfBuckets.java
│       │                       │   │   ├── Point.java
│       │                       │   │   ├── Region.java
│       │                       │   │   ├── SimpleMatrix.java
│       │                       │   │   ├── SparseMatrixUJMP.java
│       │                       │   │   ├── UJMPAdapterByteMatrix.java
│       │                       │   │   └── UJMPAdapterIntMatrix.java
│       │                       │   ├── examples/
│       │                       │   │   ├── EWHSampleMatrixPlan.java
│       │                       │   │   ├── OkcanSampleMatrixPlan.java
│       │                       │   │   ├── ThetaEWHBandJPS.java
│       │                       │   │   ├── ThetaEWHBandLineitemSelfOrderkeyJoin.java
│       │                       │   │   ├── ThetaEWHBandOrdersCustkeyCustkeyJoin.java
│       │                       │   │   ├── ThetaEWHBandOrdersOrderkeyCustkeyJoin.java
│       │                       │   │   ├── ThetaEWHBandPeer.java
│       │                       │   │   ├── ThetaEWHCustomerJoin.java
│       │                       │   │   ├── ThetaEWHEquiLineitemOrders.java
│       │                       │   │   ├── ThetaEWHEquiOrdersCustkeyCustkeyJoin.java
│       │                       │   │   ├── ThetaEWHLineitemSelfOutputDominatedJoin.java
│       │                       │   │   ├── ThetaEWHOrdersScaleJoin.java
│       │                       │   │   └── ThetaEWHPartSuppJoin.java
│       │                       │   ├── main/
│       │                       │   │   ├── PullStatisticCollector.java
│       │                       │   │   └── PushStatisticCollector.java
│       │                       │   ├── operators/
│       │                       │   │   └── SampleAsideAndForwardOperator.java
│       │                       │   ├── storm_components/
│       │                       │   │   ├── D2CombinerBolt.java
│       │                       │   │   ├── DummyBolt.java
│       │                       │   │   ├── EWHSampleMatrixBolt.java
│       │                       │   │   ├── EquiDepthHistogramBolt.java
│       │                       │   │   ├── OkcanSampleMatrixBolt.java
│       │                       │   │   ├── S1ReservoirGenerator.java
│       │                       │   │   ├── S1ReservoirMerge.java
│       │                       │   │   └── stream_grouping/
│       │                       │   │       ├── RangeFilteredMulticastStreamGrouping.java
│       │                       │   │       └── RangeMulticastStreamGrouping.java
│       │                       │   ├── utilities/
│       │                       │   │   ├── OverweightedException.java
│       │                       │   │   ├── TooSmallMaxWeightException.java
│       │                       │   │   └── TroveIntArrayTest.java
│       │                       │   └── visualize/
│       │                       │       ├── UJMPVisualizer.java
│       │                       │       └── VisualizerInterface.java
│       │                       ├── expressions/
│       │                       │   ├── Addition.java
│       │                       │   ├── ColumnReference.java
│       │                       │   ├── ConcatIntDouble.java
│       │                       │   ├── ConcatIntString.java
│       │                       │   ├── DateDiff.java
│       │                       │   ├── DateSum.java
│       │                       │   ├── Division.java
│       │                       │   ├── DoubleToInt.java
│       │                       │   ├── IntegerYearFromDate.java
│       │                       │   ├── LongPhone.java
│       │                       │   ├── Multiplication.java
│       │                       │   ├── StringConcatenate.java
│       │                       │   ├── Subtraction.java
│       │                       │   ├── ValueExpression.java
│       │                       │   └── ValueSpecification.java
│       │                       ├── main/
│       │                       │   └── Main.java
│       │                       ├── operators/
│       │                       │   ├── AggregateAvgOperator.java
│       │                       │   ├── AggregateCountOperator.java
│       │                       │   ├── AggregateOperator.java
│       │                       │   ├── AggregateStream.java
│       │                       │   ├── AggregateSumOperator.java
│       │                       │   ├── ChainOperator.java
│       │                       │   ├── CustomSampleOperatorReachGraph.java
│       │                       │   ├── DistinctOperator.java
│       │                       │   ├── MultiAggregateOperator.java
│       │                       │   ├── OneToOneOperator.java
│       │                       │   ├── Operator.java
│       │                       │   ├── PrintOperator.java
│       │                       │   ├── ProjectOperator.java
│       │                       │   ├── RedisOperator.java
│       │                       │   ├── SampleOperator.java
│       │                       │   ├── SelectOperator.java
│       │                       │   └── StoreOperator.java
│       │                       ├── predicates/
│       │                       │   ├── AndPredicate.java
│       │                       │   ├── BetweenPredicate.java
│       │                       │   ├── ComparisonPredicate.java
│       │                       │   ├── LikePredicate.java
│       │                       │   ├── OrPredicate.java
│       │                       │   ├── Predicate.java
│       │                       │   └── booleanPrimitive.java
│       │                       ├── query_plans/
│       │                       │   ├── QueryBuilder.java
│       │                       │   ├── QueryPlan.java
│       │                       │   └── ThetaQueryPlansParameters.java
│       │                       ├── storage/
│       │                       │   ├── AggregationStore.java
│       │                       │   ├── BasicStore.java
│       │                       │   ├── BitVector.java
│       │                       │   ├── KeyValueStore.java
│       │                       │   ├── TupleStorage.java
│       │                       │   ├── ValueStore.java
│       │                       │   ├── WindowAggregationStore.java
│       │                       │   ├── WindowKeyValueStore.java
│       │                       │   └── indexes/
│       │                       │       ├── BalancedBinaryTreeIndex.java
│       │                       │       ├── BplusTreeIndex.java
│       │                       │       ├── HashIndex.java
│       │                       │       └── Index.java
│       │                       ├── storm_components/
│       │                       │   ├── SignaledDataSourceComponentInterface.java
│       │                       │   ├── StormBoltComponent.java
│       │                       │   ├── StormComponent.java
│       │                       │   ├── StormDataSource.java
│       │                       │   ├── StormDstJoin.java
│       │                       │   ├── StormDstTupleStorageJoin.java
│       │                       │   ├── StormEmitter.java
│       │                       │   ├── StormJoinerBoltComponent.java
│       │                       │   ├── StormOperator.java
│       │                       │   ├── StormSpoutComponent.java
│       │                       │   ├── StormSrcHarmonizer.java
│       │                       │   ├── StormSrcJoin.java
│       │                       │   ├── StormSrcStorage.java
│       │                       │   ├── SynchronizedStormDataSourceInterface.java
│       │                       │   ├── hash_hypercube/
│       │                       │   │   └── HashHyperCubeGrouping.java
│       │                       │   ├── hybrid_hypercube/
│       │                       │   │   └── HybridHyperCubeGrouping.java
│       │                       │   ├── hyper_cube/
│       │                       │   │   ├── StormHyperCubeJoin.java
│       │                       │   │   ├── TradionalTwoWayJoin.java
│       │                       │   │   ├── TraditionalStormHyperCubeJoin.java
│       │                       │   │   └── stream_grouping/
│       │                       │   │       └── HyperCubeGrouping.java
│       │                       │   ├── stream_grouping/
│       │                       │   │   ├── BatchStreamGrouping.java
│       │                       │   │   ├── HashStreamGrouping.java
│       │                       │   │   └── ShuffleStreamGrouping.java
│       │                       │   ├── synchronization/
│       │                       │   │   └── TopologyKiller.java
│       │                       │   └── theta/
│       │                       │       ├── StormThetaJoin.java
│       │                       │       └── stream_grouping/
│       │                       │           ├── ContentInsensitiveThetaJoinGrouping.java
│       │                       │           └── ContentSensitiveThetaJoinGrouping.java
│       │                       ├── thetajoin/
│       │                       │   ├── adaptive/
│       │                       │   │   ├── advisor/
│       │                       │   │   │   ├── Action.java
│       │                       │   │   │   ├── Advisor.java
│       │                       │   │   │   ├── Discard.java
│       │                       │   │   │   ├── Maybe.java
│       │                       │   │   │   ├── Migration.java
│       │                       │   │   │   └── TheoreticalAdvisorNew.java
│       │                       │   │   ├── storm_component/
│       │                       │   │   │   ├── Quadruple.java
│       │                       │   │   │   ├── ThetaJoinerAdaptiveAdvisedEpochs.java
│       │                       │   │   │   └── ThetaReshufflerAdvisedEpochs.java
│       │                       │   │   └── storm_matrix_mapping/
│       │                       │   │       ├── ThetaDataMigrationJoinerToReshufflerMapping.java
│       │                       │   │       └── ThetaJoinAdaptiveMapping.java
│       │                       │   ├── matrix_assignment/
│       │                       │   │   ├── ArrangementIterator.java
│       │                       │   │   ├── CellIterator.java
│       │                       │   │   ├── ContentInsensitiveMatrixAssignment.java
│       │                       │   │   ├── ContentSensitiveMatrixAssignment.java
│       │                       │   │   ├── CostModel.java
│       │                       │   │   ├── CubeNAssignmentBruteForce.java
│       │                       │   │   ├── CubeNAssignmentEqui.java
│       │                       │   │   ├── HashHyperCubeAssignment.java
│       │                       │   │   ├── HashHyperCubeAssignmentBruteForce.java
│       │                       │   │   ├── HybridHyperCubeAssignment.java
│       │                       │   │   ├── HybridHyperCubeAssignmentBruteForce.java
│       │                       │   │   ├── HyperCubeAssignerFactory.java
│       │                       │   │   ├── HyperCubeAssignment.java
│       │                       │   │   ├── MBucketIPartitioning.java
│       │                       │   │   ├── ManualHybridHyperCubeAssignment.java
│       │                       │   │   ├── MatrixAssignment.java
│       │                       │   │   ├── SetArrangementIterator.java
│       │                       │   │   ├── Utilities.java
│       │                       │   │   └── exp/
│       │                       │   │       ├── HCEquiPartitionExp.java
│       │                       │   │       ├── HCPartitionExp.java
│       │                       │   │       └── TimeoutController.java
│       │                       │   └── predicate_analyser/
│       │                       │       └── PredicateAnalyser.java
│       │                       ├── types/
│       │                       │   ├── DateIntegerType.java
│       │                       │   ├── DateLongType.java
│       │                       │   ├── DateType.java
│       │                       │   ├── DoubleType.java
│       │                       │   ├── IntegerType.java
│       │                       │   ├── LongType.java
│       │                       │   ├── NumericType.java
│       │                       │   ├── StringType.java
│       │                       │   ├── SumCount.java
│       │                       │   ├── SumCountType.java
│       │                       │   └── Type.java
│       │                       ├── utilities/
│       │                       │   ├── CustomReader.java
│       │                       │   ├── DeepCopy.java
│       │                       │   ├── FileReaderProvider.java
│       │                       │   ├── LocalMergeResults.java
│       │                       │   ├── MyUtilities.java
│       │                       │   ├── PartitioningScheme.java
│       │                       │   ├── PeriodicAggBatchSend.java
│       │                       │   ├── ReaderProvider.java
│       │                       │   ├── SerializableFileInputStream.java
│       │                       │   ├── SerializableHDFSFileInputStream.java
│       │                       │   ├── SquallContext.java
│       │                       │   ├── SquallSerializationDelegate.java
│       │                       │   ├── StormWrapper.java
│       │                       │   ├── SystemParameters.java
│       │                       │   ├── statistics/
│       │                       │   │   └── StatisticsUtilities.java
│       │                       │   └── thetajoin/
│       │                       │       └── dynamic/
│       │                       │           ├── BufferedTuple.java
│       │                       │           ├── ThetaJoinUtilities.java
│       │                       │           └── ThetaState.java
│       │                       ├── visitors/
│       │                       │   ├── OperatorVisitor.java
│       │                       │   ├── PredicateCreateIndexesVisitor.java
│       │                       │   ├── PredicateUpdateIndexesVisitor.java
│       │                       │   ├── PredicateVisitor.java
│       │                       │   └── ValueExpressionVisitor.java
│       │                       └── window_semantics/
│       │                           └── WindowSemanticsManager.java
│       └── test/
│           └── scala/
│               ├── HyracksTest.scala
│               ├── RSTTest.scala
│               ├── TPCHTest.scala
│               ├── TestSuite.scala
│               ├── ThetaTest.scala
│               └── sql/
│                   ├── SqlHyracksTest.scala
│                   ├── SqlTpch10Test.scala
│                   ├── SqlTpch12Test.scala
│                   ├── SqlTpch3Test.scala
│                   ├── SqlTpch4Test.scala
│                   ├── SqlTpch5Test.scala
│                   ├── SqlTpch6Test.scala
│                   ├── SqlTpch7Test.scala
│                   ├── SqlTpch8Test.scala
│                   └── SqlTpch9Test.scala
├── squall-examples/
│   └── squall-java-examples/
│       └── src/
│           └── ch/
│               └── epfl/
│                   └── data/
│                       └── squall/
│                           └── examples/
│                               └── imperative/
│                                   ├── debug/
│                                   │   ├── HyracksL1Plan.java
│                                   │   ├── HyracksL1SelectDatePlan.java
│                                   │   ├── HyracksL1SelectIntPlan.java
│                                   │   ├── HyracksL3BatchPlan.java
│                                   │   ├── HyracksL3Plan.java
│                                   │   ├── TPCH10_CustomPlan.java
│                                   │   ├── TPCH3L1Plan.java
│                                   │   ├── TPCH3L23Plan.java
│                                   │   ├── TPCH3L2Plan.java
│                                   │   ├── TPCH5PlanAvg.java
│                                   │   ├── TPCH5_CustomPlan.java
│                                   │   ├── TPCH5_R_N_S_LPlan.java
│                                   │   ├── TPCH7_CustomPlan.java
│                                   │   ├── TPCH7_L_S_N1Plan.java
│                                   │   ├── TPCH8_9_P_LPlan.java
│                                   │   ├── TPCH9_CustomPlan.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated2_32.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated4_16.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated8_8.java
│                                   │   ├── ThetaTPCH5_R_N_S_LPlan.java
│                                   │   ├── ThetaTPCH7_CustomPlan.java
│                                   │   ├── ThetaTPCH7_L_S_N1Plan.java
│                                   │   └── ThetaTPCH8_9_P_LPlan.java
│                                   ├── shj/
│                                   │   ├── HyracksPlan.java
│                                   │   ├── HyracksPreAggPlan.java
│                                   │   ├── HyracksPredicatePlan.java
│                                   │   ├── RSTPlan.java
│                                   │   ├── SimpleAggregationPlan.java
│                                   │   ├── TPCH10Plan.java
│                                   │   ├── TPCH3Plan.java
│                                   │   ├── TPCH3PredicatePlan.java
│                                   │   ├── TPCH4Plan.java
│                                   │   ├── TPCH5Plan.java
│                                   │   ├── TPCH5PredicatePlan.java
│                                   │   ├── TPCH7Plan.java
│                                   │   ├── TPCH7PlanHDFSMaterializer.java
│                                   │   ├── TPCH8Plan.java
│                                   │   └── TPCH9Plan.java
│                                   ├── theta/
│                                   │   ├── ThetaHyracksPlan.java
│                                   │   ├── ThetaInputDominatedPlan.java
│                                   │   ├── ThetaLineitemPricesSelfJoin.java
│                                   │   ├── ThetaLineitemSelfJoin.java
│                                   │   ├── ThetaLineitemSelfJoinInputDominated.java
│                                   │   ├── ThetaMultipleJoinPlan.java
│                                   │   ├── ThetaOrdersSelfJoin.java
│                                   │   ├── ThetaOutputDominatedPlan.java
│                                   │   ├── ThetaTPCH10Plan.java
│                                   │   ├── ThetaTPCH3Plan.java
│                                   │   ├── ThetaTPCH4Plan.java
│                                   │   ├── ThetaTPCH5Plan.java
│                                   │   ├── ThetaTPCH7Plan.java
│                                   │   ├── ThetaTPCH8Plan.java
│                                   │   └── ThetaTPCH9Plan.java
│                                   └── traditional/
│                                       ├── TradionalHypercubeThetaHyracksPlan.java
│                                       ├── TraditionalGoogleMostFailedMachine.java
│                                       ├── TraditionalHashTPCH3Plan.java
│                                       ├── TraditionalHashTPCH9PartialPlan.java
│                                       ├── TraditionalHybridReachability.java
│                                       ├── TraditionalHybridTPCH3Plan.java
│                                       ├── TraditionalHybridTPCH9PartialPlan.java
│                                       ├── TraditionalHybridUrlReachability.java
│                                       ├── TraditionalHyracksPlan.java
│                                       ├── TraditionalTPCH3Plan.java
│                                       └── TraditionalTPCH5Plan.java
├── squall-functional/
│   ├── macros/
│   │   └── Macros.scala
│   └── src/
│       └── main/
│           └── scala/
│               └── ch/
│                   └── epfl/
│                       └── data/
│                           └── squall/
│                               └── api/
│                                   └── scala/
│                                       ├── REPL.scala
│                                       ├── SquallType.scala
│                                       ├── Stream.scala
│                                       ├── TPCHSchema.scala
│                                       ├── operators/
│                                       │   ├── ScalaAggregateOperator.scala
│                                       │   ├── ScalaAggregationStorage.scala
│                                       │   ├── ScalaFlatMapOperator.scala
│                                       │   ├── ScalaMapOperator.scala
│                                       │   ├── ScalaWindowAggregationStore.scala
│                                       │   └── predicates/
│                                       │       └── ScalaPredicate.scala
│                                       └── queries/
│                                           ├── ScalaHyracksPlan.scala
│                                           ├── ScalaTPCH3Plan.scala
│                                           └── ScalaTPCH7Plan.scala
├── squall-signals/
│   └── src/
│       ├── examples/
│       │   └── ch/
│       │       └── epfl/
│       │           └── data/
│       │               └── squall/
│       │                   └── examples/
│       │                       └── imperative/
│       │                           └── sync/
│       │                               └── TestSync.java
│       └── main/
│           └── java/
│               └── ch/
│                   └── epfl/
│                       └── data/
│                           └── squall/
│                               └── components/
│                                   └── signal_components/
│                                       ├── DistributionSignalSpout.java
│                                       ├── HarmonizerSignalSpout.java
│                                       ├── Histogram.java
│                                       ├── SignalUtilities.java
│                                       ├── SignaledDataSourceComponent.java
│                                       ├── StormSynchronizedSpoutComponent.java
│                                       ├── SynchronizedStormDataSource.java
│                                       └── storm/
│                                           ├── AbstractSignalConnection.java
│                                           ├── BaseSignalBolt.java
│                                           ├── BaseSignalSpout.java
│                                           ├── SignalClient.java
│                                           ├── SignalListener.java
│                                           ├── StandaloneSignalConnection.java
│                                           └── StormSignalConnection.java
└── test/
    ├── data/
    │   ├── google/
    │   │   ├── README
    │   │   ├── job_events.csv
    │   │   ├── machine_attributes.csv
    │   │   ├── machine_events.csv
    │   │   ├── schema.csv
    │   │   ├── task_constraints.csv
    │   │   ├── task_events.csv
    │   │   └── task_usage.csv
    │   ├── jps/
    │   │   └── 12K/
    │   │       ├── generate_synthetic_jps.py
    │   │       ├── jps_1.tbl
    │   │       └── jps_2.tbl
    │   ├── link_graph/
    │   │   └── 0.01G/
    │   │       ├── sd-arc.txt
    │   │       └── sd-index.txt
    │   ├── pavlo_torrent/
    │   │   ├── sample/
    │   │   │   └── peersnapshot-01.tbl
    │   │   └── schema.txt
    │   └── tpch/
    │       └── 0.01G/
    │           ├── customer.tbl
    │           ├── lineitem.tbl
    │           ├── nation.tbl
    │           ├── orders.tbl
    │           ├── part.tbl
    │           ├── partsupp.tbl
    │           ├── region.tbl
    │           └── supplier.tbl
    ├── results/
    │   ├── link_graph/
    │   │   └── 0.01G/
    │   │       └── reachability_3.result
    │   ├── rst/
    │   │   └── 10K/
    │   │       └── rst.result
    │   └── tpch/
    │       ├── 0.01G/
    │       │   ├── hyracks.result
    │       │   ├── theta_input_dominated.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_lines_self_join_mat.result
    │       │   ├── theta_multiple_join.result
    │       │   ├── theta_output_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   ├── theta_tpch7_L_S_N1.result
    │       │   ├── tpch10.result
    │       │   ├── tpch12.result
    │       │   ├── tpch17.result
    │       │   ├── tpch19.result
    │       │   ├── tpch3.result
    │       │   ├── tpch4.result
    │       │   ├── tpch5.result
    │       │   ├── tpch5avg.result
    │       │   ├── tpch6.result
    │       │   ├── tpch7.result
    │       │   ├── tpch8.result
    │       │   └── tpch9.result
    │       ├── 0.01G_z1/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       ├── 0.01G_z2/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       ├── 0.01G_z3/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       ├── 0.01G_z4/
    │       │   ├── theta_hyracks.result
    │       │   ├── theta_lines_self_join.result
    │       │   ├── theta_lines_self_join_input_dominated.result
    │       │   ├── theta_tpch5_R_N_S_L.result
    │       │   └── theta_tpch7_L_S_N1.result
    │       └── 0.1G/
    │           ├── distinct_hyracks.result
    │           ├── hyracks.result
    │           ├── hyracks_l3_batch.result
    │           ├── hyracks_pre_agg.result
    │           ├── theta_hyracks.result
    │           ├── theta_input_dominated.result
    │           ├── theta_multiple_join.result
    │           ├── theta_output_dominated.result
    │           ├── theta_tpch7.result
    │           ├── tpch10.result
    │           ├── tpch19.result
    │           ├── tpch3.result
    │           ├── tpch4.result
    │           ├── tpch5.result
    │           ├── tpch7.result
    │           ├── tpch8.result
    │           └── tpch9.result
    ├── squall/
    │   ├── confs/
    │   │   ├── cluster/
    │   │   │   ├── 40G_hyracks
    │   │   │   ├── 40G_tpch3
    │   │   │   ├── 40G_tpch7
    │   │   │   └── 40G_z0_hyracks_16J_1_11
    │   │   ├── local/
    │   │   │   ├── 0_01G_distinct_hyracks_ncl
    │   │   │   ├── 0_01G_hyracks_irb
    │   │   │   ├── 0_01G_hyracks_is
    │   │   │   ├── 0_01G_hyracks_ncl
    │   │   │   ├── 0_01G_hyracks_nmcl
    │   │   │   ├── 0_01G_hyracks_nmpl
    │   │   │   ├── 0_01G_hyracks_nrl
    │   │   │   ├── 0_01G_tpch10_irb
    │   │   │   ├── 0_01G_tpch10_ncl
    │   │   │   ├── 0_01G_tpch10_nmcl
    │   │   │   ├── 0_01G_tpch10_nrl
    │   │   │   ├── 0_01G_tpch12_ncl
    │   │   │   ├── 0_01G_tpch3_irb
    │   │   │   ├── 0_01G_tpch3_is
    │   │   │   ├── 0_01G_tpch3_ncl
    │   │   │   ├── 0_01G_tpch3_nmcl
    │   │   │   ├── 0_01G_tpch3_nrl
    │   │   │   ├── 0_01G_tpch4_ncl
    │   │   │   ├── 0_01G_tpch5_irb
    │   │   │   ├── 0_01G_tpch5_ncl
    │   │   │   ├── 0_01G_tpch5_nmcl
    │   │   │   ├── 0_01G_tpch5_nrl
    │   │   │   ├── 0_01G_tpch6_ncl
    │   │   │   ├── 0_01G_tpch7_irb
    │   │   │   ├── 0_01G_tpch7_ncl
    │   │   │   ├── 0_01G_tpch7_nmcl
    │   │   │   ├── 0_01G_tpch7_nrl
    │   │   │   ├── 0_01G_tpch8_irb
    │   │   │   ├── 0_01G_tpch8_ncl
    │   │   │   ├── 0_01G_tpch8_nmcl
    │   │   │   ├── 0_01G_tpch8_nrl
    │   │   │   ├── 0_01G_tpch9_irb
    │   │   │   ├── 0_01G_tpch9_ncl
    │   │   │   ├── 0_01G_tpch9_nmcl
    │   │   │   └── 0_01G_tpch9_nrl
    │   │   └── manual_batching/
    │   │       ├── cluster/
    │   │       │   ├── B16_10G_hyracks
    │   │       │   ├── B16_10G_tpch3
    │   │       │   ├── B16_10G_tpch5
    │   │       │   ├── B1K_10G_hyracks
    │   │       │   ├── B1K_10G_tpch10
    │   │       │   ├── B1K_10G_tpch12
    │   │       │   ├── B1K_10G_tpch3
    │   │       │   ├── B1K_10G_tpch4
    │   │       │   ├── B1K_10G_tpch5
    │   │       │   ├── B1K_10G_tpch6
    │   │       │   ├── B1K_10G_tpch9
    │   │       │   ├── B1_10G_hyracks
    │   │       │   ├── B1_10G_tpch3
    │   │       │   ├── B1_10G_tpch5
    │   │       │   ├── B256_10G_hyracks
    │   │       │   ├── B256_10G_tpch3
    │   │       │   ├── B256_10G_tpch5
    │   │       │   ├── B4K_10G_hyracks
    │   │       │   ├── B4_10G_hyracks
    │   │       │   ├── B4_10G_tpch3
    │   │       │   ├── B4_10G_tpch5
    │   │       │   ├── B4k_10G_tpch3
    │   │       │   ├── B4k_10G_tpch5
    │   │       │   ├── B64_10G_hyracks
    │   │       │   ├── B64_10G_tpch3
    │   │       │   └── B64_10G_tpch5
    │   │       └── local/
    │   │           ├── 0_01G_hyracks_local
    │   │           ├── 0_01G_tpch10_local
    │   │           ├── 0_01G_tpch12_local
    │   │           ├── 0_01G_tpch3_local
    │   │           ├── 0_01G_tpch4_local
    │   │           ├── 0_01G_tpch5_local
    │   │           ├── 0_01G_tpch6_local
    │   │           └── 0_01G_tpch9_local
    │   ├── schemas/
    │   │   ├── Ex1.txt
    │   │   ├── Ex2.txt
    │   │   ├── rst.txt
    │   │   └── tpch.txt
    │   └── sql_queries/
    │       ├── distinct_hyracks.sql
    │       ├── hyracks.sql
    │       ├── misc.sql
    │       ├── tpch10.sql
    │       ├── tpch12.sql
    │       ├── tpch19.sql
    │       ├── tpch3.sql
    │       ├── tpch4.sql
    │       ├── tpch5.sql
    │       ├── tpch6.sql
    │       ├── tpch7.sql
    │       ├── tpch8.sql
    │       └── tpch9.sql
    └── squall_plan_runner/
        └── confs/
            ├── cluster/
            │   ├── 10G_dbtoaster_hash_hypercube_hyracks
            │   ├── 10G_dbtoaster_hash_hypercube_hyracks_redis
            │   ├── 10G_dbtoaster_hash_hypercube_tpch10
            │   ├── 10G_dbtoaster_hash_hypercube_tpch3
            │   ├── 10G_dbtoaster_hash_hypercube_tpch5
            │   ├── 10G_dbtoaster_hash_hypercube_tpch9
            │   ├── 10G_dbtoaster_hash_hypercube_tpch9_partial
            │   ├── 10G_dbtoaster_hybrid_hypercube_hyracks
            │   ├── 10G_dbtoaster_hybrid_hypercube_manual_hyracks
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch3
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch5
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch9
            │   ├── 10G_dbtoaster_hybrid_hypercube_tpch9_partial
            │   ├── 10G_dbtoaster_hyracks
            │   ├── 10G_dbtoaster_seqjoin_tpch3
            │   ├── 10G_dbtoaster_seqjoin_tpch3_hash
            │   ├── 10G_dbtoaster_seqjoin_tpch5
            │   ├── 10G_dbtoaster_seqjoin_tpch5_hash
            │   ├── 10G_dbtoaster_tpch10
            │   ├── 10G_dbtoaster_tpch3
            │   ├── 10G_dbtoaster_tpch5
            │   ├── 10G_dbtoaster_tpch9
            │   ├── 10G_dbtoaster_tpch9_partial
            │   ├── 10G_dbtoaster_z1_hyracks
            │   ├── 10G_theta_hyracks
            │   ├── 10G_traditional_hash_hypercube_hyracks
            │   ├── 10G_traditional_hash_hypercube_tpch3
            │   ├── 10G_traditional_hash_hypercube_tpch9_partial
            │   ├── 10G_traditional_hybrid_hypercube_hyracks
            │   ├── 10G_traditional_hybrid_hypercube_tpch3
            │   ├── 10G_traditional_hybrid_hypercube_tpch9_partial
            │   ├── 10G_traditional_random_hypercube_hyracks
            │   ├── 10G_traditional_random_hypercube_tpch3
            │   ├── 10G_traditional_random_hypercube_tpch9_partial
            │   ├── 10G_traditional_tpch5
            │   ├── 10G_z0_hyracks
            │   ├── 10G_z0_tpch3_4
            │   ├── 10G_z0_tpch7_4
            │   ├── 10G_z1_hyracks
            │   ├── 1G_dbtoaster_hash_hypercube_tpch5
            │   ├── 1G_hyracks
            │   ├── dbtoaster_google_failed
            │   ├── dbtoaster_google_failed_traditional
            │   ├── dbtoaster_hash_hypercube_reachability
            │   ├── dbtoaster_hash_hypercube_reachability_seq
            │   ├── dbtoaster_hash_hypercube_url_reachability
            │   ├── dbtoaster_hash_hypercube_url_reachability_skewed
            │   ├── dbtoaster_hybrid_hypercube_url_reachability
            │   ├── dbtoaster_hybrid_hypercube_url_reachability_skewed
            │   ├── dbtoaster_reachability
            │   └── dbtoaster_reachability_seq
            ├── extra-local/
            │   ├── 0_01G_test_sync
            │   ├── 0_01G_test_sync2
            │   ├── 0_01G_theta_output_dominated
            │   ├── 0_01G_tpch7HDFS_Materializer
            │   └── 0_01G_tpch7HDFS_Source
            ├── local/
            │   ├── 0_01G_hyracks
            │   ├── 0_01G_hyracks_l3_batch
            │   ├── 0_01G_hyracks_pre_agg
            │   ├── 0_01G_scalahyracks
            │   ├── 0_01G_theta_hyracks
            │   ├── 0_01G_theta_input_dominated
            │   ├── 0_01G_theta_multiple_join
            │   ├── 0_01G_theta_tpch10
            │   ├── 0_01G_theta_tpch3
            │   ├── 0_01G_theta_tpch4
            │   ├── 0_01G_theta_tpch5
            │   ├── 0_01G_theta_tpch7
            │   ├── 0_01G_theta_tpch8
            │   ├── 0_01G_theta_tpch9
            │   ├── 0_01G_tpch10
            │   ├── 0_01G_tpch3
            │   ├── 0_01G_tpch4
            │   ├── 0_01G_tpch5
            │   ├── 0_01G_tpch5avg
            │   ├── 0_01G_tpch7
            │   ├── 0_01G_tpch8
            │   ├── 0_01G_tpch9
            │   ├── 0_01G_traditional_hash_hypercube_hyracks
            │   ├── 0_01G_traditional_hash_hypercube_tpch3
            │   ├── 0_01G_traditional_hybrid_hypercube_hyracks
            │   ├── 0_01G_traditional_hyracks
            │   ├── 0_01G_traditional_random_hypercube_hyracks
            │   ├── 0_01G_traditional_tpch3
            │   ├── 0_01G_traditional_tpch5
            │   ├── 10K_rst
            │   ├── traditional_reachability
            │   └── traditional_url_reachability
            ├── low_selectivity/
            │   ├── ewh_sample/
            │   │   └── local/
            │   │       └── eclipse-run/
            │   │           ├── 0_01G_lineitem_self_input
            │   │           ├── 0_01G_theta_line_self_join
            │   │           ├── 0_01G_theta_tpch7_L_S_N1
            │   │           └── sample_peer_self
            │   ├── push/
            │   │   └── local/
            │   │       ├── console/
            │   │       │   ├── 0_01G_theta_hyracks
            │   │       │   ├── 0_01G_theta_line_self_join
            │   │       │   ├── 0_01G_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z1_theta_hyracks
            │   │       │   ├── 0_01G_z1_theta_line_self_join
            │   │       │   ├── 0_01G_z1_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z1_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z1_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z2_theta_hyracks
            │   │       │   ├── 0_01G_z2_theta_line_self_join
            │   │       │   ├── 0_01G_z2_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z2_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z2_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z3_theta_hyracks
            │   │       │   ├── 0_01G_z3_theta_line_self_join
            │   │       │   ├── 0_01G_z3_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z3_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z3_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z4_theta_hyracks
            │   │       │   ├── 0_01G_z4_theta_line_self_join
            │   │       │   ├── 0_01G_z4_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z4_theta_tpch5_R_N_S_L
            │   │       │   └── 0_01G_z4_theta_tpch7_L_S_N1
            │   │       ├── console-joiners/
            │   │       │   ├── 0_01G_theta_hyracks_16J
            │   │       │   ├── 0_01G_theta_hyracks_32J
            │   │       │   ├── 0_01G_theta_hyracks_64J
            │   │       │   ├── 0_01G_theta_hyracks_8J
            │   │       │   ├── 0_01G_theta_hyracks_l128J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_16J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_32J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_64J
            │   │       │   ├── 0_01G_z1_theta_line_self_join_8J
            │   │       │   └── 0_01G_z1_theta_line_self_join_l128J
            │   │       ├── console-run/
            │   │       │   ├── 0_01G_theta_hyracks
            │   │       │   ├── 0_01G_theta_line_self_join
            │   │       │   ├── 0_01G_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z1_theta_hyracks
            │   │       │   ├── 0_01G_z1_theta_line_self_join
            │   │       │   ├── 0_01G_z1_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z1_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z1_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z2_theta_hyracks
            │   │       │   ├── 0_01G_z2_theta_line_self_join
            │   │       │   ├── 0_01G_z2_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z2_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z2_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z3_theta_hyracks
            │   │       │   ├── 0_01G_z3_theta_line_self_join
            │   │       │   ├── 0_01G_z3_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z3_theta_tpch5_R_N_S_L
            │   │       │   ├── 0_01G_z3_theta_tpch7_L_S_N1
            │   │       │   ├── 0_01G_z4_theta_hyracks
            │   │       │   ├── 0_01G_z4_theta_line_self_join
            │   │       │   ├── 0_01G_z4_theta_line_self_join_input_dominated
            │   │       │   ├── 0_01G_z4_theta_tpch5_R_N_S_L
            │   │       │   └── 0_01G_z4_theta_tpch7_L_S_N1
            │   │       └── eclipse-run/
            │   │           ├── 0_01G_theta_hyracks
            │   │           ├── 0_01G_theta_line_self_join
            │   │           ├── 0_01G_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z1_theta_hyracks
            │   │           ├── 0_01G_z1_theta_line_self_join
            │   │           ├── 0_01G_z1_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z1_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_z1_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z2_theta_hyracks
            │   │           ├── 0_01G_z2_theta_line_self_join
            │   │           ├── 0_01G_z2_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z2_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_z2_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z3_theta_hyracks
            │   │           ├── 0_01G_z3_theta_line_self_join
            │   │           ├── 0_01G_z3_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z3_theta_tpch5_R_N_S_L
            │   │           ├── 0_01G_z3_theta_tpch7_L_S_N1
            │   │           ├── 0_01G_z4_theta_hyracks
            │   │           ├── 0_01G_z4_theta_line_self_join
            │   │           ├── 0_01G_z4_theta_line_self_join_input_dominated
            │   │           ├── 0_01G_z4_theta_tpch5_R_N_S_L
            │   │           └── 0_01G_z4_theta_tpch7_L_S_N1
            │   └── sample/
            │       └── local/
            │           ├── eclipse-generic/
            │           │   ├── 0_01G_theta_line_self_join
            │           │   └── 0_01G_theta_tpch7_L_S_N1
            │           └── eclipse-run/
            │               ├── 0_01G_theta_line_self_join
            │               └── 0_01G_theta_tpch7_L_S_N1
            ├── manual_batching/
            │   ├── config_template.txt
            │   ├── latency/
            │   │   └── local/
            │   │       ├── 0_01G_theta_tpch5_test
            │   │       ├── 10G_uniform_static_naive_bnci
            │   │       └── 10G_uniform_static_opt_bnci
            │   ├── parallel/
            │   │   ├── formula/
            │   │   │   ├── 10G_hyracks_parallel
            │   │   │   ├── 10K_rst_parallel
            │   │   │   ├── 1G_hyracksPreAgg_parallel
            │   │   │   ├── 1G_hyracks_parallel
            │   │   │   ├── 1G_tpch3_parallel_4
            │   │   │   ├── 1G_tpch7_parallel_4
            │   │   │   ├── 5G_hyracks_parallel
            │   │   │   ├── 5G_hyracks_parallel_t2
            │   │   │   └── 8G_tpch7_parallel_1
            │   │   └── guess/
            │   │       ├── 1G_tpch7_parallel_16_formula
            │   │       ├── 1G_tpch7_parallel_16_opt
            │   │       ├── 1G_tpch7_parallel_16_opt_32ACK
            │   │       ├── 1G_tpch7_parallel_1_20
            │   │       ├── 1G_tpch7_parallel_1_20_F1
            │   │       ├── 1G_tpch7_parallel_1_20_F16
            │   │       ├── 1G_tpch7_parallel_1_20_F3
            │   │       ├── 1G_tpch7_parallel_1_2x
            │   │       ├── 1G_tpch7_parallel_2_20
            │   │       ├── 1G_tpch7_parallel_2_20_8ACK
            │   │       ├── 1G_tpch7_parallel_2_20_BB
            │   │       ├── 1G_tpch7_parallel_2_20_SB
            │   │       ├── 1G_tpch7_parallel_2_20_formula
            │   │       ├── 1G_tpch7_parallel_2_2x
            │   │       ├── 1G_tpch7_parallel_4_20
            │   │       ├── 1G_tpch7_parallel_4_20_formula
            │   │       ├── 1G_tpch7_parallel_4_2x
            │   │       ├── 1G_tpch7_parallel_4_2xx
            │   │       ├── 1G_tpch7_parallel_8_20
            │   │       ├── 1G_tpch7_parallel_8_2EQ
            │   │       ├── 1G_tpch7_parallel_8_2x
            │   │       ├── 1G_tpch7_parallel_8_2xx
            │   │       ├── 1G_tpch7_parallel_8_2xxx
            │   │       ├── 1G_tpch7_parallel_8_opt
            │   │       ├── 1G_tpch7_parallel_old
            │   │       ├── 4G_hyracks_parallel_t1
            │   │       ├── 5G_hyracksPreAgg_parallel_t1
            │   │       └── 5G_hyracksPreAgg_parallel_t2
            │   └── serial/
            │       ├── 0.01G_hyracks_pre_agg_serial
            │       ├── 0.01G_hyracks_serial
            │       ├── 0.01G_theta_hyracks_serial
            │       ├── 0.01G_theta_input_dominated_serial
            │       ├── 0.01G_theta_multiple_join_serial
            │       ├── 0.01G_theta_output_dominated_serial
            │       ├── 0.01G_theta_tpch7_serial
            │       ├── 0.01G_tpch10_serial
            │       ├── 0.01G_tpch3_serial
            │       ├── 0.01G_tpch4_serial
            │       ├── 0.01G_tpch5_serial
            │       ├── 0.01G_tpch7_serial
            │       ├── 0.01G_tpch8_serial
            │       ├── 0.01G_tpch9_serial
            │       └── 10K_rst_serial
            └── squall-ui/
                ├── google_failed_h1_hash-local1_dbtoaster-8
                ├── google_failed_h1_hash-local1_traditional-8
                ├── google_failed_h1_hybrid-local1_dbtoaster-8
                ├── google_failed_h1_hybrid-local1_traditional-8
                ├── google_failed_h1_random-local1_dbtoaster-8
                ├── google_failed_h1_random-local1_traditional-8
                ├── hyrakcs_h1_hash-local1_dbtoaster-16
                ├── hyrakcs_h1_hash-local1_traditional-16
                ├── hyrakcs_h1_hybrid-local1_dbtoaster-16
                ├── hyrakcs_h1_hybrid-local1_traditional-16
                ├── hyrakcs_h1_random-local1_dbtoaster-16
                ├── hyrakcs_h1_random-local1_traditional-16
                ├── reachability_h1_hash-local1_dbtoaster-36
                ├── reachability_h1_hash-local1_traditional-36
                ├── reachability_h1_hybrid-local1_dbtoaster-36
                ├── reachability_h1_hybrid-local1_traditional-36
                ├── reachability_h1_random-local1_dbtoaster-36
                ├── reachability_h1_random-local1_traditional-36
                ├── seq_reachability_h1_hash-local1_dbtoaster-h2_hash-local2_dbtoaster-36
                ├── seq_reachability_h1_hash-local1_dbtoaster-h2_hybrid-local2_dbtoaster-36
                ├── seq_reachability_h1_hash-local1_dbtoaster-h2_random-local2_dbtoaster-36
                ├── seq_reachability_h1_hybrid-local1_dbtoaster-h2_hash-local2_dbtoaster-36
                ├── seq_reachability_h1_hybrid-local1_dbtoaster-h2_hybrid-local2_dbtoaster-36
                ├── seq_reachability_h1_random-local1_dbtoaster-h2_hash-local2_dbtoaster-36
                ├── seq_reachability_h1_random-local1_dbtoaster-h2_hybrid-local2_dbtoaster-36
                ├── seq_reachability_h1_random-local1_dbtoaster-h2_random-local2_dbtoaster-36
                ├── tpch9_partial_h1_hash-local1_dbtoaster-8
                ├── tpch9_partial_h1_hash-local1_traditional-8
                ├── tpch9_partial_h1_hybrid-local1_dbtoaster-8
                ├── tpch9_partial_h1_hybrid-local1_traditional-8
                ├── tpch9_partial_h1_random-local1_dbtoaster-8
                ├── tpch9_partial_h1_random-local1_traditional-8
                ├── url_reachability_skewed_h1_hash-local1_dbtoaster-40
                ├── url_reachability_skewed_h1_hash-local1_traditional-40
                ├── url_reachability_skewed_h1_hybrid-local1_dbtoaster-40
                ├── url_reachability_skewed_h1_hybrid-local1_traditional-40
                ├── url_reachability_skewed_h1_random-local1_dbtoaster-40
                └── url_reachability_skewed_h1_random-local1_tradtional-40
Download .txt
Showing preview only (361K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4418 symbols across 384 files)

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/ConfigSelectivityEstimator.java
  class ConfigSelectivityEstimator (line 26) | public class ConfigSelectivityEstimator {
    method ConfigSelectivityEstimator (line 30) | public ConfigSelectivityEstimator(Map map) {
    method estimate (line 37) | public double estimate(String compName) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/HardCodedSelectivities.java
  class HardCodedSelectivities (line 27) | public class HardCodedSelectivities {
    method createErrorMessage (line 29) | private static String createErrorMessage(String queryName, Expression ...
    method estimate (line 37) | public static double estimate(String queryName, Expression expr) {
    method estimate (line 52) | private static double estimate(String queryName, LikeExpression like) {
    method estimate (line 61) | private static double estimate(String queryName, MinorThan mt) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/JSQLTypeConverter.java
  class JSQLTypeConverter (line 66) | public class JSQLTypeConverter implements ExpressionVisitor {
    method getResult (line 70) | public Object getResult() {
    method visit (line 74) | @Override
    method visit (line 79) | @Override
    method visit (line 84) | @Override
    method visit (line 89) | @Override
    method visit (line 94) | @Override
    method visit (line 99) | @Override
    method visit (line 104) | @Override
    method visit (line 109) | @Override
    method visit (line 114) | @Override
    method visit (line 119) | @Override
    method visit (line 124) | @Override
    method visit (line 129) | @Override
    method visit (line 134) | @Override
    method visit (line 139) | @Override
    method visit (line 144) | @Override
    method visit (line 149) | @Override
    method visit (line 154) | @Override
    method visit (line 159) | @Override
    method visit (line 164) | @Override
    method visit (line 169) | @Override
    method visit (line 174) | @Override
    method visit (line 179) | @Override
    method visit (line 184) | @Override
    method visit (line 189) | @Override
    method visit (line 194) | @Override
    method visit (line 199) | @Override
    method visit (line 204) | @Override
    method visit (line 209) | @Override
    method visit (line 214) | @Override
    method visit (line 219) | @Override
    method visit (line 225) | @Override
    method visit (line 230) | @Override
    method visit (line 235) | @Override
    method visit (line 240) | @Override
    method visit (line 245) | @Override
    method visit (line 250) | @Override
    method visit (line 255) | @Override
    method visit (line 260) | @Override
    method visit (line 265) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/SelectivityEstimator.java
  type SelectivityEstimator (line 24) | public interface SelectivityEstimator {
    method estimate (line 26) | public double estimate(Expression expr);

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/SelingerSelectivityEstimator.java
  class SelingerSelectivityEstimator (line 51) | public class SelingerSelectivityEstimator implements SelectivityEstimator {
    method SelingerSelectivityEstimator (line 57) | public SelingerSelectivityEstimator(String queryName, Schema schema,
    method doubleToLong (line 64) | private Long doubleToLong(Double doubleValue) {
    method estimate (line 72) | public double estimate(AndExpression and) {
    method estimate (line 93) | public double estimate(EqualsTo equals) {
    method estimate (line 105) | @Override
    method estimate (line 134) | public double estimate(GreaterThan gt) {
    method estimate (line 146) | public double estimate(GreaterThanEquals gt) {
    method estimate (line 154) | public double estimate(List<Expression> exprs) {
    method estimate (line 166) | public double estimate(MinorThan mt) {
    method estimate (line 217) | public double estimate(MinorThanEquals mte) {
    method estimate (line 232) | public double estimate(NotEqualsTo ne) {
    method estimate (line 243) | public double estimate(OrExpression or) {
    method findConditionConstant (line 251) | private Object findConditionConstant(Expression exp) {
    method longToDouble (line 258) | private Double longToDouble(Long longValue) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/main/ParserMain.java
  class ParserMain (line 39) | public class ParserMain {
    method main (line 40) | public static void main(String[] args) {
    method createConfig (line 60) | public Map createConfig(String parserConfPath) {
    method generatePlan (line 74) | public QueryBuilder generatePlan(Map map) {
    method pickOptimizer (line 79) | private Optimizer pickOptimizer(Map map) {
    method putAckers (line 101) | public Map putAckers(QueryBuilder plan, Map map) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/CompGen.java
  type CompGen (line 28) | public interface CompGen {
    method generateDataSource (line 34) | public DataSourceComponent generateDataSource(String tableCompName);
    method generateEquiJoin (line 39) | public Component generateEquiJoin(Component left, Component right);
    method getQueryBuilder (line 41) | public QueryBuilder getQueryBuilder();
    method getSubPlans (line 43) | public List<Component> getSubPlans();

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/Optimizer.java
  type Optimizer (line 24) | public interface Optimizer {
    method generate (line 26) | public QueryBuilder generate();

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/CompLevel.java
  class CompLevel (line 24) | public class CompLevel implements Comparable<CompLevel> {
    method CompLevel (line 28) | public CompLevel(Component comp, int level) {
    method compareTo (line 33) | @Override
    method getComponent (line 39) | public Component getComponent() {
    method getLevel (line 43) | public int getLevel() {
    method setLevel (line 47) | public void setLevel(int level) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/EarlyProjection.java
  class EarlyProjection (line 49) | public class EarlyProjection {
    class CompPackage (line 50) | private class CompPackage implements Comparable<CompPackage> {
      method CompPackage (line 57) | public CompPackage(Component component, int level) {
      method compareTo (line 70) | @Override
      method getComponent (line 76) | public Component getComponent() {
      method getLeftParentOutputSize (line 80) | public int getLeftParentOutputSize() {
      method getLevel (line 84) | public int getLevel() {
    method EarlyProjection (line 98) | EarlyProjection(Schema schema, TableAliasName tan) {
    method addOffset (line 103) | private List<Integer> addOffset(List<Integer> intList, int offset) {
    method addToLevelCollection (line 113) | private void addToLevelCollection(Component component, int level) {
    method arrivedFromParents (line 120) | private List<Integer> arrivedFromParents(CompPackage cp) {
    method bottomUp (line 145) | private void bottomUp(Component component, List<Integer> inheritedUsed,
    method bottomUp (line 203) | private void bottomUp(QueryBuilder queryPlan) {
    method createRightSendIndexes (line 208) | private List<Integer> createRightSendIndexes(
    method elemsBefore (line 225) | private int elemsBefore(int elem, List<Integer> intList) {
    method elemsBefore (line 233) | private List<Integer> elemsBefore(List<Integer> old,
    method extractProjIndexesAfterBottomUp (line 241) | private List<Integer> extractProjIndexesAfterBottomUp(Component comp) {
    method filterEqualBigger (line 249) | private List<Integer> filterEqualBigger(List<Integer> indexes, int lim...
    method filterHash (line 258) | private List<Integer> filterHash(List<Integer> old, List<Integer> hash...
    method filterLess (line 272) | private List<Integer> filterLess(List<Integer> indexes, int limit) {
    method getAfterProjVEs (line 280) | private List<ValueExpression> getAfterProjVEs(Component component) {
    method getAllVEs (line 286) | private List<ValueExpression> getAllVEs(Component component) {
    method getBeforeProjVEs (line 292) | private List<ValueExpression> getBeforeProjVEs(Component component) {
    method getDirectlyUsedIndexes (line 300) | private List<Integer> getDirectlyUsedIndexes(Component component) {
    method operate (line 318) | public void operate(QueryBuilder queryPlan) {
    method positionListIngoreHash (line 323) | private int positionListIngoreHash(int normalized, List<Integer> hashI...
    method sortElimDuplicates (line 346) | private List<Integer> sortElimDuplicates(List<Integer> indexes) {
    method topDown (line 367) | private void topDown() {
    method updateColumnRefs (line 397) | private void updateColumnRefs(List<ColumnReference> crList,
    method updateIndexes (line 407) | private void updateIndexes(Component component,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexCompGen.java
  class IndexCompGen (line 43) | public class IndexCompGen implements CompGen {
    method IndexCompGen (line 56) | public IndexCompGen(Schema schema, SQLVisitor pq, Map map) {
    method addHash (line 68) | private void addHash(Component component, List<Expression> joinConditi...
    method generateDataSource (line 95) | @Override
    method generateEquiJoin (line 112) | @Override
    method getQueryBuilder (line 137) | @Override
    method getSubPlans (line 142) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexRuleOptimizer.java
  class IndexRuleOptimizer (line 62) | public class IndexRuleOptimizer implements Optimizer {
    method IndexRuleOptimizer (line 71) | public IndexRuleOptimizer(Map map) {
    method attachSelectClause (line 79) | private void attachSelectClause(Component lastComponent,
    method attachWhereClause (line 137) | private void attachWhereClause(Component affectedComponent,
    method earlyProjection (line 142) | private void earlyProjection(QueryBuilder queryPlan) {
    method generate (line 147) | @Override
    method generateTableJoins (line 171) | private IndexCompGen generateTableJoins() {
    method getNumHighLevelPairs (line 274) | private int getNumHighLevelPairs(int numTables) {
    method getWhereForComponents (line 290) | private Map<String, Expression> getWhereForComponents(Expression where...
    method processSelectClause (line 330) | private int processSelectClause(List<SelectItem> selectItems) {
    method processWhereClause (line 349) | private void processWhereClause(Expression whereExpr) {
    method processWhereForComponent (line 372) | private void processWhereForComponent(Component affectedComponent,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexSimpleOptimizer.java
  class IndexSimpleOptimizer (line 48) | public class IndexSimpleOptimizer implements Optimizer {
    method IndexSimpleOptimizer (line 56) | public IndexSimpleOptimizer(Map map) {
    method attachSelectClause (line 64) | private void attachSelectClause(List<AggregateOperator> aggOps,
    method attachWhereClause (line 128) | private void attachWhereClause(SelectOperator select,
    method generate (line 133) | @Override
    method generateTableJoins (line 150) | private IndexCompGen generateTableJoins() {
    method processSelectClause (line 171) | private int processSelectClause(List<SelectItem> selectItems) {
    method processWhereClause (line 186) | private void processWhereClause(Expression whereExpr) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexTranslator.java
  class IndexTranslator (line 33) | public class IndexTranslator {
    method IndexTranslator (line 37) | public IndexTranslator(Schema schema, TableAliasName tan) {
    method contains (line 42) | public boolean contains(List<ColumnNameType> tupleSchema, String colum...
    method getChildIndex (line 47) | public int getChildIndex(int originalIndex, Component originator,
    method getColumnIndex (line 94) | public int getColumnIndex(Column column, Component requestor) {
    method indexOf (line 123) | public int indexOf(List<ColumnNameType> tupleSchema, String columnName) {
    method isHashedBy (line 138) | public boolean isHashedBy(Component component, List<Integer> hashIndex...
    method isSuperset (line 159) | private boolean isSuperset(List<Integer> parentHashIndexes,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/LevelAssigner.java
  class LevelAssigner (line 29) | public class LevelAssigner {
    method LevelAssigner (line 41) | public LevelAssigner(Component lastComponent) {
    method getNonSourceComponents (line 46) | public List<CompLevel> getNonSourceComponents() {
    method getSources (line 50) | public List<DataSourceComponent> getSources() {
    method orderComponents (line 56) | private void orderComponents() {
    method visit (line 66) | private void visit(Component comp, int level) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/RuleParallelismAssigner.java
  class RuleParallelismAssigner (line 32) | public class RuleParallelismAssigner {
    method RuleParallelismAssigner (line 42) | public RuleParallelismAssigner(QueryBuilder plan, TableAliasName tan,
    method assignPar (line 51) | public void assignPar() {
    method assignParDataSource (line 61) | private void assignParDataSource(List<DataSourceComponent> sources) {
    method assignParNonDataSource (line 72) | private void assignParNonDataSource(List<CompLevel> clList) {
    method getNumOfTuples (line 96) | private long getNumOfTuples(String compName) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/TableSelector.java
  class TableSelector (line 31) | public class TableSelector {
    class PairTableNameSize (line 32) | public class PairTableNameSize implements Comparable<PairTableNameSize> {
      method PairTableNameSize (line 36) | public PairTableNameSize(Table table, long size) {
      method compareTo (line 41) | @Override
      method getSize (line 47) | public long getSize() {
      method getTableName (line 51) | public String getTableName() {
    method TableSelector (line 60) | public TableSelector(List<Table> listTables, Schema schema,
    method createSizePairs (line 70) | private List<PairTableNameSize> createSizePairs(List<Table> listTables,
    method removeAll (line 85) | public List<String> removeAll() {
    method removeBestPairedTableName (line 93) | public String removeBestPairedTableName(List<String> joinedWith) {
    method removeBestTableName (line 107) | public String removeBestTableName() {
    method size (line 111) | public int size() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostEstimator.java
  class CostEstimator (line 41) | public class CostEstimator {
    method CostEstimator (line 52) | public CostEstimator(String queryName, Schema schema, SQLVisitor pq,
    method computeHashSelectivity (line 65) | private double computeHashSelectivity(String leftJoinTableSchemaName,
    method computeJoinSelectivity (line 98) | private double computeJoinSelectivity(EquiJoinComponent joinComponent,
    method getJoinSchemaNames (line 143) | private List<String> getJoinSchemaNames(List<String> allJoinCompNames,
    method processWhereCost (line 156) | public void processWhereCost(Component component, Expression whereComp...
    method setInputParams (line 171) | public void setInputParams(DataSourceComponent source) {
    method setInputParams (line 180) | public void setInputParams(EquiJoinComponent joinComponent,
    method setInputParams (line 203) | public void setInputParams(OperatorComponent opComp) {
    method setOutputParams (line 213) | private void setOutputParams(Component comp) {
    method setOutputParamsAndPar (line 221) | public void setOutputParamsAndPar(DataSourceComponent source) {
    method setOutputParamsAndPar (line 229) | public void setOutputParamsAndPar(EquiJoinComponent joinComponent) {
    method setOutputParamsAndPar (line 238) | public void setOutputParamsAndPar(OperatorComponent opComp) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostParallelismAssigner.java
  class CostParallelismAssigner (line 40) | public class CostParallelismAssigner {
    class OrderedCostParams (line 50) | private static class OrderedCostParams extends CostParams implements
      method OrderedCostParams (line 58) | public OrderedCostParams(String componentName, long cardinality) {
      method compareTo (line 63) | @Override
      method getComponentName (line 71) | public String getComponentName() {
    method CostParallelismAssigner (line 86) | public CostParallelismAssigner(Schema schema, TableAliasName tan, Map ...
    method computeSourcePar (line 97) | public Map<String, Integer> computeSourcePar(int totalSourcePar) {
    method estimateDistinctHashes (line 182) | private int estimateDistinctHashes(CostParams leftParentParams,
    method estimateMinParallelism (line 208) | private int estimateMinParallelism(CostParams leftParentParams,
    method extractNames (line 221) | private List<String> extractNames(List<OrderedCostParams> sourceCostPa...
    method extractNamesPar (line 230) | private Map<String, Integer> extractNamesPar(
    method getSortedSourceNames (line 241) | public List<String> getSortedSourceNames() {
    method parallelismFormula (line 245) | protected int parallelismFormula(DataSourceComponent source) {
    method parallelismFormula (line 250) | protected int parallelismFormula(String compName, CostParams params,
    method setBatchSize (line 268) | protected void setBatchSize(DataSourceComponent source,
    method setBatchSize (line 273) | protected void setBatchSize(EquiJoinComponent joinComponent,
    method setBatchSize (line 278) | protected void setBatchSize(OperatorComponent operator,
    method setParallelism (line 283) | public void setParallelism(DataSourceComponent source,
    method setParallelism (line 297) | public void setParallelism(EquiJoinComponent joinComponent,
    method setParallelism (line 357) | public void setParallelism(OperatorComponent opComp,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostParams.java
  class CostParams (line 32) | public class CostParams implements Serializable {
    method getBatchSize (line 50) | public int getBatchSize() {
    method getCardinality (line 57) | public long getCardinality() {
    method getLatency (line 64) | public double getLatency() {
    method getParallelism (line 71) | public int getParallelism() {
    method getSchema (line 78) | public TupleSchema getSchema() {
    method getSelectivity (line 85) | public double getSelectivity() {
    method getTotalAvgLatency (line 92) | public double getTotalAvgLatency() {
    method setBatchSize (line 100) | public void setBatchSize(int batchSize) {
    method setCardinality (line 108) | public void setCardinality(long cardinality) {
    method setLatency (line 116) | public void setLatency(double latency) {
    method setParallelism (line 124) | public void setParallelism(int parallelism) {
    method setSchema (line 132) | public void setSchema(TupleSchema schema) {
    method setSelectivity (line 140) | public void setSelectivity(double selectivity) {
    method setTotalAvgLatency (line 148) | public void setTotalAvgLatency(double totalAvgLatency) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCompGen.java
  class NameCompGen (line 59) | public class NameCompGen implements CompGen {
    method NameCompGen (line 111) | public NameCompGen(Schema schema, Map map,
    method addHash (line 136) | private void addHash(Component component,
    method addJoinHash (line 166) | private void addJoinHash(Component component, List<Expression> joinCon...
    method addProjectOperator (line 181) | private void addProjectOperator(Component component) {
    method addSelectOperator (line 201) | private void addSelectOperator(Component component) {
    method appendAnd (line 209) | private Expression appendAnd(Expression fullExpr, Expression atomicExp...
    method appendOr (line 220) | private Expression appendOr(Expression fullExpr, Expression atomicExpr) {
    method attachProjectOperator (line 231) | private void attachProjectOperator(Component component,
    method attachSelectClauseOnLastJoin (line 236) | private void attachSelectClauseOnLastJoin(Component lastComponent,
    method attachWhereClause (line 275) | private void attachWhereClause(Component affectedComponent,
    method createAddDataSource (line 280) | private DataSourceComponent createAddDataSource(String tableCompName) {
    method createAndAddEquiJoin (line 291) | private EquiJoinComponent createAndAddEquiJoin(Component left,
    method createAndAddOperatorComp (line 300) | private OperatorComponent createAndAddOperatorComp(Component lastCompo...
    method createCompCost (line 311) | private void createCompCost(DataSourceComponent source) {
    method createCompCost (line 333) | private void createCompCost(EquiJoinComponent joinComponent) {
    method createCompCost (line 346) | private void createCompCost(OperatorComponent opComp) {
    method createWhereForComponent (line 361) | private Expression createWhereForComponent(Component component) {
    method deepCopy (line 391) | public NameCompGen deepCopy() {
    method generateDataSource (line 419) | @Override
    method generateEquiJoin (line 454) | @Override
    method generateOperatorComp (line 505) | private OperatorComponent generateOperatorComp(Component lastComponent,
    method getCompCost (line 538) | public Map<String, CostParams> getCompCost() {
    method getCostParameters (line 542) | public CostParams getCostParameters(String componentName) {
    method getFinalSelectVisitor (line 549) | private NameSelectItemsVisitor getFinalSelectVisitor(Component lastCom...
    method getMineSubset (line 565) | public Expression getMineSubset(DataSourceComponent source, Expression...
    method getQueryBuilder (line 596) | @Override
    method getSubPlans (line 601) | @Override
    method initWhereClause (line 606) | private void initWhereClause(Expression whereExpr) {
    method processProjectCost (line 626) | private void processProjectCost(Component component,
    method processWhereForComponent (line 641) | private void processWhereForComponent(Component affectedComponent,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCompGenFactory.java
  class NameCompGenFactory (line 32) | public class NameCompGenFactory {
    method NameCompGenFactory (line 42) | public NameCompGenFactory(Map map, TableAliasName tan) {
    method NameCompGenFactory (line 52) | public NameCompGenFactory(Map map, TableAliasName tan, int totalSource...
    method create (line 57) | public NameCompGen create() {
    method getParAssigner (line 61) | public CostParallelismAssigner getParAssigner() {
    method setParAssignerMode (line 65) | public final void setParAssignerMode(int totalSourcePar) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCostOptimizer.java
  class NameCostOptimizer (line 41) | public class NameCostOptimizer implements Optimizer {
    method NameCostOptimizer (line 47) | public NameCostOptimizer(Map map) {
    method addEquiJoinNotSuboptimal (line 52) | private void addEquiJoinNotSuboptimal(Component firstComp,
    method chooseBest (line 76) | private NameCompGen chooseBest(List<NameCompGen> ncgList) {
    method generate (line 88) | @Override
    method getMinTotalPar (line 166) | private int getMinTotalPar(List<NameCompGen> ncgList) {
    method getMinTotalParIndex (line 171) | private int getMinTotalParIndex(List<NameCompGen> ncgList) {
    method pruneSubplans (line 185) | private List<NameCompGen> pruneSubplans(List<NameCompGen> ncgList) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameManualOptimizer.java
  class NameManualOptimizer (line 37) | public class NameManualOptimizer implements Optimizer {
    method NameManualOptimizer (line 48) | public NameManualOptimizer(Map map) {
    method generate (line 55) | @Override
    method parse (line 75) | private void parse() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameManualParOptimizer.java
  class NameManualParOptimizer (line 37) | public class NameManualParOptimizer implements Optimizer {
    method NameManualParOptimizer (line 54) | public NameManualParOptimizer(Map map) {
    method generate (line 66) | @Override
    method parse (line 84) | private void parse() {
    method putJoin (line 108) | private void putJoin(String compName, int par) {
    method putSource (line 112) | private void putSource(String compName, int par) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameRuleOptimizer.java
  class NameRuleOptimizer (line 35) | public class NameRuleOptimizer implements Optimizer {
    method NameRuleOptimizer (line 39) | public NameRuleOptimizer(Map map) {
    method chooseSmallestSource (line 49) | private String chooseSmallestSource(Component lastComp,
    method generate (line 63) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameTranslator.java
  class NameTranslator (line 38) | public class NameTranslator {
    method NameTranslator (line 46) | public NameTranslator(String compName) {
    method contains (line 53) | public boolean contains(TupleSchema tupleSchema, Expression expr) {
    method getColumnIndex (line 68) | public int getColumnIndex(TupleSchema tupleSchema, Column column) {
    method getType (line 83) | public Type getType(TupleSchema tupleSchema, Expression expr) {
    method indexOf (line 98) | private int indexOf(List<ColumnNameType> tupleSchema, String columnNam...
    method indexOf (line 108) | public int indexOf(TupleSchema tupleSchema, Expression expr) {
    method translateExpr (line 127) | private void translateExpr(TupleSchema tupleSchema, Expression expr) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/ProjGlobalCollect.java
  class ProjGlobalCollect (line 39) | public class ProjGlobalCollect {
    method ProjGlobalCollect (line 46) | public ProjGlobalCollect(List<SelectItem> selectItems, Expression wher...
    method collectInternalExprs (line 51) | private void collectInternalExprs(Function fun) {
    method getExprList (line 63) | public List<Expression> getExprList() {
    method getOrExprs (line 70) | public List<OrExpression> getOrExprs() {
    method process (line 74) | public void process() {
    method processSelectClause (line 84) | private void processSelectClause(List<SelectItem> selectItems) {
    method processWhereClause (line 120) | private void processWhereClause(Expression whereExpr) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/ProjSchemaCreator.java
  class ProjSchemaCreator (line 51) | public class ProjSchemaCreator {
    method ProjSchemaCreator (line 71) | public ProjSchemaCreator(ProjGlobalCollect globalProject,
    method chooseProjections (line 98) | private List<Expression> chooseProjections(List<Expression> exprList) {
    method create (line 139) | public void create() {
    method createSchema (line 166) | private TupleSchema createSchema(List<Expression> choosenExprs) {
    method eliminateDuplicates (line 195) | private List<Expression> eliminateDuplicates(List<Expression> exprList) {
    method getAloneColumnNames (line 213) | private List<String> getAloneColumnNames(List<Expression> exprList) {
    method getOutputSchema (line 223) | public TupleSchema getOutputSchema() {
    method getProjectOperator (line 230) | public ProjectOperator getProjectOperator() {
    method getTC (line 237) | private Type getTC(Expression expr) {
    method processGlobalExprs (line 255) | private void processGlobalExprs(List<Expression> exprList) {
    method processGlobalOrs (line 268) | private void processGlobalOrs(List<Expression> exprList) {
    method processHashes (line 293) | private void processHashes(List<Expression> exprList) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ClusterConstants.java
  class ClusterConstants (line 22) | public class ClusterConstants {
    method getDeserTime (line 24) | public static double getDeserTime(int batchSize) {
    method getJoinTime (line 59) | public static double getJoinTime() {
    method getOpTime (line 64) | public static double getOpTime() {
    method getReadTime (line 75) | public static double getReadTime() {
    method getSerTime (line 79) | public static double getSerTime(int batchSize) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ManualBatchingCompGenFactory.java
  class ManualBatchingCompGenFactory (line 33) | public class ManualBatchingCompGenFactory {
    method ManualBatchingCompGenFactory (line 43) | public ManualBatchingCompGenFactory(Map map, TableAliasName tan) {
    method ManualBatchingCompGenFactory (line 53) | public ManualBatchingCompGenFactory(Map map, TableAliasName tan,
    method create (line 59) | public NameCompGen create() {
    method getParAssigner (line 63) | public ManualBatchingParallelismAssigner getParAssigner() {
    method setParAssignerMode (line 67) | public final void setParAssignerMode(int totalSourcePar) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ManualBatchingOptimizer.java
  class ManualBatchingOptimizer (line 41) | public class ManualBatchingOptimizer implements Optimizer {
    method ManualBatchingOptimizer (line 47) | public ManualBatchingOptimizer(Map map) {
    method addEquiJoinNotSuboptimal (line 52) | private void addEquiJoinNotSuboptimal(Component firstComp,
    method chooseBest (line 76) | private NameCompGen chooseBest(List<NameCompGen> ncgList) {
    method generate (line 88) | @Override
    method getMinTotalLatencyIndex (line 169) | private int getMinTotalLatencyIndex(List<NameCompGen> ncgList) {
    method getTotalLatency (line 185) | private double getTotalLatency(NameCompGen ncg) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ManualBatchingParallelismAssigner.java
  class ManualBatchingParallelismAssigner (line 35) | public class ManualBatchingParallelismAssigner extends CostParallelismAs...
    method ManualBatchingParallelismAssigner (line 40) | public ManualBatchingParallelismAssigner(Schema schema, TableAliasName...
    method estimateJoinLatency (line 50) | private double estimateJoinLatency(int parallelism,
    method estimateJoinRcvTime (line 61) | private double estimateJoinRcvTime(int parallelism,
    method estimateJoinUsefullLatency (line 76) | private double estimateJoinUsefullLatency(int parallelism,
    method estimateOpRcvTime (line 90) | private double estimateOpRcvTime(int parallelism, CostParams parentPar...
    method estimateOpUsefullLatency (line 98) | private double estimateOpUsefullLatency(int parallelism,
    method estimateSndTimeLeftParent (line 108) | private double estimateSndTimeLeftParent(int parallelism,
    method estimateSndTimeParents (line 118) | private double estimateSndTimeParents(int parallelism,
    method estimateSndTimeRightParent (line 144) | private double estimateSndTimeRightParent(int parallelism,
    method parallelismFormula (line 154) | @Override
    method parallelismFormula (line 173) | @Override
    method setBatchSize (line 213) | @Override
    method setBatchSize (line 235) | @Override
    method setParallelism (line 265) | @Override
    method updateJoinLatencies (line 279) | private void updateJoinLatencies(int parallelism, CostParams params,
    method updateOpLatencies (line 316) | private void updateOpLatencies(int parallelism, CostParams params,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/ColumnNameType.java
  class ColumnNameType (line 26) | public class ColumnNameType implements Serializable {
    method ColumnNameType (line 32) | public ColumnNameType(String name, Type type) {
    method equals (line 37) | @Override
    method getName (line 48) | public String getName() {
    method getType (line 52) | public Type getType() {
    method hashCode (line 56) | @Override
    method toString (line 64) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/Schema.java
  class Schema (line 33) | public class Schema {
    class Range (line 35) | public class Range<T> {
      method Range (line 38) | public Range(T min, T max) {
      method getMax (line 43) | public T getMax() {
      method getMin (line 47) | public T getMin() {
    method Schema (line 58) | public Schema(Map map) {
    method Schema (line 63) | public Schema(String path, double scallingFactor) {
    method contains (line 76) | public boolean contains(String fullSchemaColumnName) {
    method getColumnInfo (line 81) | private ColumnInfo getColumnInfo(String fullSchemaColumnName) {
    method getColumnInfo (line 93) | private ColumnInfo getColumnInfo(String tableSchemaName, String column...
    method getNumDistinctValues (line 99) | public long getNumDistinctValues(String fullSchemaColumnName) {
    method getRange (line 113) | public Range getRange(String fullSchemaColumnName) {
    method getRatio (line 132) | public double getRatio(String firstTable, String secondTable) {
    method getTableInfo (line 139) | private TableInfo getTableInfo(String tableSchemaName) {
    method getTableSchema (line 147) | public List<ColumnNameType> getTableSchema(String tableSchemaName) {
    method getTableSize (line 154) | public long getTableSize(String tableSchemaName) {
    method getType (line 171) | public Type getType(String fullSchemaColumnName) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/ParseException.java
  class ParseException (line 32) | public class ParseException extends Exception {
    method add_escapes (line 38) | static String add_escapes(String str) {
    method initialise (line 87) | private static String initialise(Token currentToken,
    method ParseException (line 169) | public ParseException() {
    method ParseException (line 174) | public ParseException(String message) {
    method ParseException (line 184) | public ParseException(Token currentTokenVal,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SchemaParser.java
  class SchemaParser (line 42) | public class SchemaParser implements SchemaParserConstants {
    class ColumnInfo (line 43) | public static class ColumnInfo {
      method getDistinctValues (line 55) | public long getDistinctValues() {
      method getMaxValue (line 59) | public Object getMaxValue() {
      method getMinValue (line 63) | public Object getMinValue() {
      method getName (line 67) | public String getName() {
      method getType (line 71) | public Type getType() {
      method setDistinctValues (line 75) | public void setDistinctValues(long distinctValues) {
      method setMaxValue (line 79) | public void setMaxValue(Object maxValue) {
      method setMinValue (line 83) | public void setMinValue(Object minValue) {
      method setName (line 87) | public void setName(String name) {
      method setType (line 91) | public void setType(String type) {
      method strToTypeConv (line 95) | public Type strToTypeConv(String type) {
      method toString (line 110) | @Override
    class TableInfo (line 121) | public static class TableInfo {
      method addColumn (line 130) | public void addColumn(ColumnInfo ci) {
      method getColumnInfos (line 135) | public Map<String, ColumnInfo> getColumnInfos() {
      method getName (line 139) | public String getName() {
      method getTableSchema (line 143) | public List<ColumnNameType> getTableSchema() {
      method getTableSize (line 147) | public long getTableSize() {
      method setName (line 151) | public void setName(String name) {
      method setTableSize (line 155) | public void setTableSize(long tableSize) {
      method toString (line 159) | @Override
    method getFileInputStream (line 172) | public static InputStream getFileInputStream(String path) {
    method getParsedString (line 189) | public static String getParsedString(Map<String, TableInfo> tables) {
    method getSchemaInfo (line 196) | public static Map<String, TableInfo> getSchemaInfo(String path,
    method jj_la1_init_0 (line 202) | private static void jj_la1_init_0() {
    method main (line 208) | public static void main(String args[]) throws ParseException {
    method SchemaParser (line 248) | public SchemaParser(java.io.InputStream stream) {
    method SchemaParser (line 253) | public SchemaParser(java.io.InputStream stream, String encoding) {
    method SchemaParser (line 268) | public SchemaParser(java.io.Reader stream) {
    method SchemaParser (line 279) | public SchemaParser(SchemaParserTokenManager tm) {
    method disable_tracing (line 289) | final public void disable_tracing() {
    method DistinctValues (line 292) | final public void DistinctValues(ColumnInfo ci, double scallingFactor)
    method enable_tracing (line 302) | final public void enable_tracing() {
    method generateParseException (line 306) | public ParseException generateParseException() {
    method getNextToken (line 331) | final public Token getNextToken() {
    method getToken (line 342) | final public Token getToken(int index) {
    method Input (line 353) | final public Map<String, TableInfo> Input(double scallingFactor)
    method jj_consume_token (line 377) | private Token jj_consume_token(int kind) throws ParseException {
    method jj_ntk (line 393) | private int jj_ntk() {
    method MatchedColumn (line 401) | final public ColumnInfo MatchedColumn(double scallingFactor)
    method MatchedLong (line 418) | final public long MatchedLong(double scallingFactor) throws ParseExcep...
    method MatchedObject (line 439) | final public Object MatchedObject(ColumnInfo ci, double scallingFactor)
    method MatchedTable (line 491) | final public TableInfo MatchedTable(double scallingFactor)
    method MaxValue (line 536) | final public void MaxValue(ColumnInfo ci, double scallingFactor)
    method MinValue (line 545) | final public void MinValue(ColumnInfo ci, double scallingFactor)
    method OptionalColumn (line 554) | final public void OptionalColumn(ColumnInfo ci, double scallingFactor)
    method ReInit (line 586) | public void ReInit(java.io.InputStream stream) {
    method ReInit (line 591) | public void ReInit(java.io.InputStream stream, String encoding) {
    method ReInit (line 606) | public void ReInit(java.io.Reader stream) {
    method ReInit (line 617) | public void ReInit(SchemaParserTokenManager tm) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SchemaParserConstants.java
  type SchemaParserConstants (line 28) | public interface SchemaParserConstants {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SchemaParserTokenManager.java
  class SchemaParserTokenManager (line 25) | public class SchemaParserTokenManager implements SchemaParserConstants {
    method SchemaParserTokenManager (line 65) | public SchemaParserTokenManager(SimpleCharStream stream) {
    method SchemaParserTokenManager (line 73) | public SchemaParserTokenManager(SimpleCharStream stream, int lexState) {
    method getNextToken (line 79) | public Token getNextToken() {
    method jjAddStates (line 137) | private void jjAddStates(int start, int end) {
    method jjCheckNAdd (line 143) | private void jjCheckNAdd(int state) {
    method jjFillToken (line 150) | protected Token jjFillToken() {
    method jjMoveNfa_0 (line 173) | private int jjMoveNfa_0(int startState, int curPos) {
    method jjMoveStringLiteralDfa0_0 (line 397) | private int jjMoveStringLiteralDfa0_0() {
    method jjMoveStringLiteralDfa1_0 (line 429) | private int jjMoveStringLiteralDfa1_0(long active0) {
    method jjMoveStringLiteralDfa2_0 (line 454) | private int jjMoveStringLiteralDfa2_0(long old0, long active0) {
    method jjMoveStringLiteralDfa3_0 (line 486) | private int jjMoveStringLiteralDfa3_0(long old0, long active0) {
    method jjMoveStringLiteralDfa4_0 (line 508) | private int jjMoveStringLiteralDfa4_0(long old0, long active0) {
    method jjMoveStringLiteralDfa5_0 (line 532) | private int jjMoveStringLiteralDfa5_0(long old0, long active0) {
    method jjMoveStringLiteralDfa6_0 (line 551) | private int jjMoveStringLiteralDfa6_0(long old0, long active0) {
    method jjMoveStringLiteralDfa7_0 (line 570) | private int jjMoveStringLiteralDfa7_0(long old0, long active0) {
    method jjStartNfa_0 (line 591) | private final int jjStartNfa_0(int pos, long active0) {
    method jjStartNfaWithStates_0 (line 595) | private int jjStartNfaWithStates_0(int pos, int kind, int state) {
    method jjStopAtPos (line 606) | private int jjStopAtPos(int pos, int kind) {
    method jjStopStringLiteralDfa_0 (line 612) | private final int jjStopStringLiteralDfa_0(int pos, long active0) {
    method ReInit (line 676) | public void ReInit(SimpleCharStream stream) {
    method ReInit (line 684) | public void ReInit(SimpleCharStream stream, int lexState) {
    method ReInitRounds (line 689) | private void ReInitRounds() {
    method setDebugStream (line 697) | public void setDebugStream(java.io.PrintStream ds) {
    method SwitchTo (line 702) | public void SwitchTo(int lexState) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SimpleCharStream.java
  class SimpleCharStream (line 30) | public class SimpleCharStream {
    method SimpleCharStream (line 55) | public SimpleCharStream(java.io.InputStream dstream) {
    method SimpleCharStream (line 60) | public SimpleCharStream(java.io.InputStream dstream, int startline,
    method SimpleCharStream (line 66) | public SimpleCharStream(java.io.InputStream dstream, int startline,
    method SimpleCharStream (line 73) | public SimpleCharStream(java.io.InputStream dstream, String encoding)
    method SimpleCharStream (line 79) | public SimpleCharStream(java.io.InputStream dstream, String encoding,
    method SimpleCharStream (line 86) | public SimpleCharStream(java.io.InputStream dstream, String encoding,
    method SimpleCharStream (line 95) | public SimpleCharStream(java.io.Reader dstream) {
    method SimpleCharStream (line 100) | public SimpleCharStream(java.io.Reader dstream, int startline,
    method SimpleCharStream (line 106) | public SimpleCharStream(java.io.Reader dstream, int startline,
    method adjustBeginLineColumn (line 121) | public void adjustBeginLineColumn(int newLine, int newCol) {
    method backup (line 159) | public void backup(int amount) {
    method BeginToken (line 167) | public char BeginToken() throws java.io.IOException {
    method Done (line 176) | public void Done() {
    method ExpandBuff (line 182) | protected void ExpandBuff(boolean wrapAround) {
    method FillBuff (line 232) | protected void FillBuff() throws java.io.IOException {
    method getBeginColumn (line 268) | public int getBeginColumn() {
    method getBeginLine (line 273) | public int getBeginLine() {
    method getColumn (line 277) | @Deprecated
    method getEndColumn (line 287) | public int getEndColumn() {
    method getEndLine (line 292) | public int getEndLine() {
    method GetImage (line 297) | public String GetImage() {
    method getLine (line 305) | @Deprecated
    method GetSuffix (line 315) | public char[] GetSuffix(int len) {
    method getTabSize (line 329) | protected int getTabSize(int i) {
    method readChar (line 334) | public char readChar() throws java.io.IOException {
    method ReInit (line 354) | public void ReInit(java.io.InputStream dstream) {
    method ReInit (line 359) | public void ReInit(java.io.InputStream dstream, int startline,
    method ReInit (line 365) | public void ReInit(java.io.InputStream dstream, int startline,
    method ReInit (line 372) | public void ReInit(java.io.InputStream dstream, String encoding)
    method ReInit (line 378) | public void ReInit(java.io.InputStream dstream, String encoding,
    method ReInit (line 385) | public void ReInit(java.io.InputStream dstream, String encoding,
    method ReInit (line 394) | public void ReInit(java.io.Reader dstream) {
    method ReInit (line 399) | public void ReInit(java.io.Reader dstream, int startline, int startcol...
    method ReInit (line 404) | public void ReInit(java.io.Reader dstream, int startline, int startcol...
    method setTabSize (line 421) | protected void setTabSize(int i) {
    method UpdateLineColumn (line 425) | protected void UpdateLineColumn(char c) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/Token.java
  class Token (line 29) | public class Token implements java.io.Serializable {
    method newToken (line 31) | public static Token newToken(int ofKind) {
    method newToken (line 45) | public static Token newToken(int ofKind, String image) {
    method Token (line 106) | public Token() {
    method Token (line 112) | public Token(int kind) {
    method Token (line 119) | public Token(int kind, String image) {
    method getValue (line 131) | public Object getValue() {
    method toString (line 138) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/TokenMgrError.java
  class TokenMgrError (line 26) | public class TokenMgrError extends Error {
    method addEscapes (line 32) | protected static final String addEscapes(String str) {
    method LexicalError (line 89) | protected static String LexicalError(boolean EOFSeen, int lexState,
    method TokenMgrError (line 136) | public TokenMgrError() {
    method TokenMgrError (line 144) | public TokenMgrError(boolean EOFSeen, int lexState, int errorLine,
    method TokenMgrError (line 151) | public TokenMgrError(String message, int reason) {
    method getMessage (line 163) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/HierarchyExtractor.java
  class HierarchyExtractor (line 30) | public class HierarchyExtractor {
    method contains (line 32) | private static boolean contains(Set<String> biggerSet,
    method getLCM (line 42) | public static Component getLCM(Component first, Component second) {
    method getLCM (line 52) | public static Component getLCM(List<Component> compList) {
    method isLCM (line 63) | public static boolean isLCM(Component component, Set<String> orCompNam...

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/ImproperParallelismException.java
  class ImproperParallelismException (line 26) | public class ImproperParallelismException extends RuntimeException {
    method ImproperParallelismException (line 33) | public ImproperParallelismException(String msg) {
    method getMessage (line 37) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/JoinTablesExprs.java
  class JoinTablesExprs (line 41) | public class JoinTablesExprs {
    method addEntry (line 46) | public void addEntry(Table leftTable, Table rightTable, Expression exp) {
    method addToJoinMap (line 59) | private void addToJoinMap(String tblName1, String tblName2, Expression...
    method getExpressions (line 85) | public List<Expression> getExpressions(List<String> tables1,
    method getExpressions (line 99) | public List<Expression> getExpressions(String table1, List<String> tab...
    method getExpressions (line 112) | public List<Expression> getExpressions(String tableName1, String table...
    method getJoinedWith (line 128) | public List<String> getJoinedWith(List<String> ancestors) {
    method getJoinedWith (line 138) | private List<String> getJoinedWith(
    method getJoinedWith (line 156) | public List<String> getJoinedWith(String tblCompName) {
    method getJoinedWithSingleDir (line 165) | public List<String> getJoinedWithSingleDir(String tblCompName) {
    method joinExistsBetween (line 169) | public boolean joinExistsBetween(List<String> firstAncestors,
    method joinExistsBetween (line 177) | public boolean joinExistsBetween(String firstSource,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/NotFromMyBranchException.java
  class NotFromMyBranchException (line 22) | public class NotFromMyBranchException extends RuntimeException {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/ParserUtil.java
  class ParserUtil (line 68) | public class ParserUtil {
    method addAndExprsToComps (line 73) | public static void addAndExprsToComps(
    method addAndExprToComp (line 93) | public static void addAndExprToComp(
    method addOrExprsToComps (line 111) | public static void addOrExprsToComps(
    method addOrExprToComp (line 118) | public static void addOrExprToComp(
    method addToCollection (line 132) | public static <K, V> void addToCollection(K key, V singleValue,
    method batchesToMap (line 144) | public static void batchesToMap(NameCompGen cg, Map map) {
    method copyColumn (line 155) | public static void copyColumn(Column toColumn, Column fromColumn) {
    method copyColumn (line 160) | public static void copyColumn(Column toColumn, String fromColumnStr) {
    method createAliasedSchema (line 169) | public static TupleSchema createAliasedSchema(
    method createListExp (line 184) | public static <T> List<T> createListExp(T elem) {
    method equals (line 190) | public static boolean equals(Table table1, Table table2) {
    method extractColumnIndexes (line 199) | public static List<Integer> extractColumnIndexes(
    method generateUniqueName (line 218) | public static String generateUniqueName(String nameBase) {
    method getColumnRefFromVEs (line 229) | public static List<ColumnReference> getColumnRefFromVEs(
    method getColumnRefIndexes (line 240) | public static List<Integer> getColumnRefIndexes(List<ColumnReference> ...
    method getCompNamesFromColumns (line 247) | public static List<String> getCompNamesFromColumns(List<Column> column...
    method getComponent (line 259) | public static Component getComponent(String compName, CompGen cg) {
    method getComponentName (line 263) | public static String getComponentName(Column column) {
    method getComponentName (line 270) | public static String getComponentName(List<Column> columns) {
    method getComponentName (line 278) | public static String getComponentName(Table table) {
    method getComponents (line 288) | public static List<Component> getComponents(List<String> compNameList,
    method getDifference (line 296) | public static <T> List<T> getDifference(List<T> bigger, List<T> smalle...
    method getFullAliasedName (line 307) | public static String getFullAliasedName(Column column) {
    method getFullName (line 311) | public static String getFullName(String tableCompName, String columnNa...
    method getFullSchemaColumnName (line 315) | public static String getFullSchemaColumnName(Column column,
    method getFullSchemaColumnName (line 323) | public static String getFullSchemaColumnName(String fullAliasedName,
    method getIntersection (line 334) | public static <T> List<T> getIntersection(List<T> list1, List<T> list2) {
    method getJoinCondition (line 342) | public static List<Expression> getJoinCondition(SQLVisitor pq,
    method getJSQLColumns (line 349) | public static List<Column> getJSQLColumns(Expression expr) {
    method getJSQLColumns (line 355) | public static List<Column> getJSQLColumns(List<Expression> exprs) {
    method getNumElementsBefore (line 367) | public static int getNumElementsBefore(int endIndex, List<Integer> ele...
    method getPreOpsOutputSize (line 375) | public static int getPreOpsOutputSize(Component component, Schema schema,
    method getPreOpsOutputSize (line 405) | public static int getPreOpsOutputSize(DataSourceComponent source,
    method getProjectedSchema (line 411) | public static List<ColumnNameType> getProjectedSchema(
    method getSourceNameList (line 420) | public static List<String> getSourceNameList(Component component) {
    method getSourceNameSet (line 429) | public static Set<String> getSourceNameSet(Component component) {
    method getStringExpr (line 439) | public static String getStringExpr(Expression expr) {
    method getStringExpr (line 445) | public static String getStringExpr(ExpressionList params) {
    method getStringExpr (line 452) | public static <T extends Expression> String getStringExpr(List<T> list...
    method getSubExpressions (line 464) | public static List<Expression> getSubExpressions(Expression expr) {
    method getTotalParallelism (line 484) | public static int getTotalParallelism(NameCompGen ncg) {
    method getTotalParallelism (line 494) | public static int getTotalParallelism(QueryBuilder plan,
    method isAllColumnRefs (line 507) | public static boolean isAllColumnRefs(List<ValueExpression> veList) {
    method isFinalComponent (line 518) | public static boolean isFinalComponent(Component comp, SQLVisitor pq) {
    method isSameSchema (line 525) | public static boolean isSameSchema(TupleSchema listSchema1,
    method joinSchema (line 535) | public static TupleSchema joinSchema(Component[] parents,
    method listToArr (line 588) | public static int[] listToArr(List<Integer> list) {
    method listToStr (line 595) | public static <T> String listToStr(List<T> list) {
    method nameToColumn (line 608) | public static Column nameToColumn(String name) {
    method orderOperators (line 621) | private static List<Operator> orderOperators(ChainOperator chain) {
    method orderOperators (line 647) | public static void orderOperators(QueryBuilder queryPlan) {
    method parallelismToMap (line 655) | public static int parallelismToMap(Map<String, Integer> compNamePars,
    method parallelismToMap (line 676) | public static int parallelismToMap(NameCompGen cg, Map map) {
    method parseQuery (line 687) | public static SQLVisitor parseQuery(Map map) {
    method parseQuery (line 695) | public static SQLVisitor parseQuery(String sqlString) {
    method parseQuery (line 699) | private static SQLVisitor parseQuery(String sqlString, String queryNam...
    method parToString (line 722) | public static String parToString(QueryBuilder plan, Map<String, String...
    method printParsedQuery (line 745) | public static void printParsedQuery(SQLVisitor pq) {
    method readSQL (line 752) | private static String readSQL(Map map) {
    method toString (line 760) | public static String toString(Join join) {
    method toString (line 792) | public static String toString(QueryBuilder queryPlan) {
    method toString (line 814) | public static String toString(Table table) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/TableAliasName.java
  class TableAliasName (line 35) | public class TableAliasName {
    method TableAliasName (line 46) | public TableAliasName(List<Table> tableList, String queryName) {
    method getComponentNames (line 58) | public List<String> getComponentNames() {
    method getFullSchemaColumnName (line 72) | public String getFullSchemaColumnName(Column column) {
    method getSchemaName (line 79) | public String getSchemaName(String tableCompName) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/TupleSchema.java
  class TupleSchema (line 33) | public class TupleSchema implements Serializable {
    method TupleSchema (line 41) | public TupleSchema(List<ColumnNameType> cnts) {
    method getOriginal (line 49) | public String getOriginal(Column synonimColumn) {
    method getSchema (line 56) | public List<ColumnNameType> getSchema() {
    method getSynonims (line 60) | public Map<String, String> getSynonims() {
    method setSynonims (line 64) | public void setSynonims(Map<String, String> columnSynonims) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/AndVisitor.java
  class AndVisitor (line 71) | public class AndVisitor implements ExpressionVisitor {
    method getAtomicExprs (line 79) | public List<Expression> getAtomicExprs() {
    method getOrExprs (line 83) | public List<OrExpression> getOrExprs() {
    method visit (line 88) | @Override
    method visit (line 93) | @Override
    method visit (line 98) | @Override
    method visit (line 107) | @Override
    method visit (line 112) | @Override
    method visit (line 117) | @Override
    method visit (line 122) | @Override
    method visit (line 127) | @Override
    method visit (line 132) | @Override
    method visit (line 137) | @Override
    method visit (line 142) | @Override
    method visit (line 147) | @Override
    method visit (line 152) | @Override
    method visit (line 157) | @Override
    method visit (line 163) | @Override
    method visit (line 168) | @Override
    method visit (line 173) | @Override
    method visit (line 178) | @Override
    method visit (line 183) | @Override
    method visit (line 188) | @Override
    method visit (line 193) | @Override
    method visit (line 198) | @Override
    method visit (line 203) | @Override
    method visit (line 208) | @Override
    method visit (line 213) | @Override
    method visit (line 218) | @Override
    method visit (line 223) | @Override
    method visit (line 228) | @Override
    method visit (line 233) | @Override
    method visit (line 238) | @Override
    method visit (line 244) | @Override
    method visit (line 249) | @Override
    method visit (line 254) | @Override
    method visit (line 259) | @Override
    method visit (line 264) | @Override
    method visit (line 269) | @Override
    method visit (line 274) | @Override
    method visit (line 279) | @Override
    method visit (line 284) | @Override
    method visitAndSide (line 289) | private void visitAndSide(Expression sideExpr) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/ColumnCollectVisitor.java
  class ColumnCollectVisitor (line 71) | public class ColumnCollectVisitor implements ExpressionVisitor,
    method getColumns (line 76) | public List<Column> getColumns() {
    method visit (line 80) | @Override
    method visit (line 85) | @Override
    method visit (line 90) | @Override
    method visit (line 95) | @Override
    method visit (line 100) | @Override
    method visit (line 105) | @Override
    method visit (line 110) | @Override
    method visit (line 115) | @Override
    method visit (line 120) | @Override
    method visit (line 125) | @Override
    method visit (line 130) | @Override
    method visit (line 135) | @Override
    method visit (line 140) | @Override
    method visit (line 145) | @Override
    method visit (line 150) | @Override
    method visit (line 155) | @Override
    method visit (line 160) | @Override
    method visit (line 169) | @Override
    method visit (line 176) | @Override
    method visit (line 181) | @Override
    method visit (line 186) | @Override
    method visit (line 191) | @Override
    method visit (line 196) | @Override
    method visit (line 201) | @Override
    method visit (line 206) | @Override
    method visit (line 211) | @Override
    method visit (line 216) | @Override
    method visit (line 221) | @Override
    method visit (line 226) | @Override
    method visit (line 231) | @Override
    method visit (line 236) | @Override
    method visit (line 242) | @Override
    method visit (line 247) | @Override
    method visit (line 252) | @Override
    method visit (line 257) | @Override
    method visit (line 262) | @Override
    method visit (line 267) | @Override
    method visit (line 272) | @Override
    method visit (line 277) | @Override
    method visit (line 282) | @Override
    method visitBinaryOperation (line 287) | private void visitBinaryOperation(BinaryExpression be) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/JoinTablesExprsVisitor.java
  class JoinTablesExprsVisitor (line 94) | public class JoinTablesExprsVisitor implements ExpressionVisitor,
    method getJoinTablesExp (line 99) | public JoinTablesExprs getJoinTablesExp() {
    method visit (line 103) | @Override
    method visit (line 108) | @Override
    method visit (line 113) | @Override
    method visit (line 118) | @Override
    method visit (line 123) | @Override
    method visit (line 128) | @Override
    method visit (line 133) | @Override
    method visit (line 138) | @Override
    method visit (line 143) | @Override
    method visit (line 148) | @Override
    method visit (line 158) | @Override
    method visit (line 163) | @Override
    method visit (line 167) | @Override
    method visit (line 174) | @Override
    method visit (line 178) | @Override
    method visit (line 185) | @Override
    method visit (line 190) | @Override
    method visit (line 199) | @Override
    method visit (line 210) | @Override
    method visit (line 215) | @Override
    method visit (line 220) | @Override
    method visit (line 225) | @Override
    method visit (line 230) | @Override
    method visit (line 235) | @Override
    method visit (line 240) | @Override
    method visit (line 245) | @Override
    method visit (line 249) | @Override
    method visit (line 254) | @Override
    method visit (line 259) | @Override
    method visit (line 264) | @Override
    method visit (line 269) | @Override
    method visit (line 275) | @Override
    method visit (line 281) | @Override
    method visit (line 286) | @Override
    method visit (line 291) | @Override
    method visit (line 295) | @Override
    method visit (line 300) | @Override
    method visit (line 305) | @Override
    method visit (line 310) | @Override
    method visit (line 315) | @Override
    method visitBinaryOperation (line 320) | private void visitBinaryOperation(BinaryExpression be) {
    method visitSideEquals (line 325) | private Table visitSideEquals(Expression ex) {
    method visitUnsupportedOp (line 334) | private void visitUnsupportedOp() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/MaxSubExpressionsVisitor.java
  class MaxSubExpressionsVisitor (line 84) | public class MaxSubExpressionsVisitor implements ExpressionVisitor,
    method MaxSubExpressionsVisitor (line 90) | public MaxSubExpressionsVisitor(NameTranslator nt,
    method getExprs (line 96) | public List<Expression> getExprs() {
    method isAllSubsMine (line 105) | public boolean isAllSubsMine(Expression expr) {
    method isRecognized (line 127) | private boolean isRecognized(Expression expr) {
    method visit (line 137) | @Override
    method visit (line 143) | @Override
    method visit (line 149) | @Override
    method visit (line 154) | @Override
    method visit (line 159) | @Override
    method visit (line 164) | @Override
    method visit (line 169) | @Override
    method visit (line 174) | @Override
    method visit (line 179) | @Override
    method visit (line 184) | @Override
    method visit (line 191) | @Override
    method visit (line 196) | @Override
    method visit (line 201) | @Override
    method visit (line 207) | @Override
    method visit (line 212) | @Override
    method visit (line 217) | @Override
    method visit (line 222) | @Override
    method visit (line 231) | @Override
    method visit (line 237) | @Override
    method visit (line 242) | @Override
    method visit (line 247) | @Override
    method visit (line 252) | @Override
    method visit (line 257) | @Override
    method visit (line 262) | @Override
    method visit (line 267) | @Override
    method visit (line 272) | public void visit(List<Expression> inputExprList) {
    method visit (line 277) | @Override
    method visit (line 282) | @Override
    method visit (line 287) | @Override
    method visit (line 292) | @Override
    method visit (line 297) | @Override
    method visit (line 303) | @Override
    method visit (line 309) | @Override
    method visit (line 314) | @Override
    method visit (line 319) | @Override
    method visit (line 325) | @Override
    method visit (line 330) | @Override
    method visit (line 335) | @Override
    method visit (line 341) | @Override
    method visit (line 346) | @Override
    method visit (line 351) | @Override
    method visitBinaryOp (line 356) | private void visitBinaryOp(BinaryExpression be) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/PrintVisitor.java
  class PrintVisitor (line 74) | public class PrintVisitor implements ExpressionVisitor, ItemsListVisitor {
    method getString (line 77) | public String getString() {
    method visit (line 83) | @Override
    method visit (line 88) | @Override
    method visit (line 93) | @Override
    method visit (line 98) | @Override
    method visit (line 103) | @Override
    method visit (line 108) | @Override
    method visit (line 113) | @Override
    method visit (line 118) | @Override
    method visit (line 123) | @Override
    method visit (line 128) | @Override
    method visit (line 133) | @Override
    method visit (line 138) | @Override
    method visit (line 143) | @Override
    method visit (line 148) | @Override
    method visit (line 153) | @Override
    method visit (line 158) | @Override
    method visit (line 163) | @Override
    method visit (line 174) | @Override
    method visit (line 189) | @Override
    method visit (line 194) | @Override
    method visit (line 199) | @Override
    method visit (line 204) | @Override
    method visit (line 209) | @Override
    method visit (line 214) | @Override
    method visit (line 219) | @Override
    method visit (line 224) | @Override
    method visit (line 229) | @Override
    method visit (line 234) | @Override
    method visit (line 239) | @Override
    method visit (line 244) | @Override
    method visit (line 249) | @Override
    method visit (line 255) | @Override
    method visit (line 260) | @Override
    method visit (line 265) | @Override
    method visit (line 272) | @Override
    method visit (line 277) | @Override
    method visit (line 282) | @Override
    method visit (line 287) | @Override
    method visit (line 292) | @Override
    method visit (line 297) | @Override
    method visitBinaryExpression (line 303) | private void visitBinaryExpression(BinaryExpression binaryExpression,

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/SQLVisitor.java
  class SQLVisitor (line 86) | public class SQLVisitor implements SelectVisitor, FromItemVisitor,
    method SQLVisitor (line 101) | public SQLVisitor(String queryName) {
    method doneVisiting (line 105) | public void doneVisiting() {
    method getJte (line 120) | public JoinTablesExprs getJte() {
    method getSelectItems (line 124) | public List<SelectItem> getSelectItems() {
    method getTableList (line 128) | public List<Table> getTableList() {
    method getTan (line 132) | public TableAliasName getTan() {
    method getWhereExpr (line 136) | public Expression getWhereExpr() {
    method visit (line 140) | @Override
    method visit (line 145) | @Override
    method visit (line 150) | @Override
    method visit (line 155) | @Override
    method visit (line 160) | @Override
    method visit (line 167) | @Override
    method visit (line 172) | @Override
    method visit (line 177) | @Override
    method visit (line 189) | @Override
    method visit (line 194) | @Override
    method visit (line 198) | @Override
    method visit (line 203) | @Override
    method visit (line 207) | @Override
    method visit (line 212) | @Override
    method visit (line 216) | @Override
    method visit (line 221) | @Override
    method visit (line 226) | @Override
    method visit (line 237) | @Override
    method visit (line 241) | @Override
    method visit (line 246) | @Override
    method visit (line 251) | @Override
    method visit (line 257) | @Override
    method visit (line 262) | @Override
    method visit (line 266) | @Override
    method visit (line 270) | public void visit(Join join) {
    method visit (line 274) | @Override
    method visit (line 279) | @Override
    method visit (line 283) | @Override
    method visit (line 288) | @Override
    method visit (line 293) | @Override
    method visit (line 298) | @Override
    method visit (line 303) | @Override
    method visit (line 308) | @Override
    method visit (line 312) | @Override
    method visit (line 317) | @Override
    method visit (line 323) | @Override
    method visit (line 342) | public void visit(Select select) {
    method visit (line 350) | @Override
    method visit (line 354) | @Override
    method visit (line 361) | @Override
    method visit (line 367) | @Override
    method visit (line 372) | @Override
    method visit (line 377) | @Override
    method visit (line 381) | @Override
    method visit (line 385) | @Override
    method visit (line 401) | @Override
    method visitBinaryExpression (line 405) | private void visitBinaryExpression(BinaryExpression binaryExpression) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/ColumnRefCollectVisitor.java
  class ColumnRefCollectVisitor (line 38) | public class ColumnRefCollectVisitor implements ValueExpressionVisitor {
    method getColumnRefs (line 41) | public List<ColumnReference> getColumnRefs() {
    method visit (line 45) | @Override
    method visit (line 50) | @Override
    method visit (line 55) | @Override
    method visit (line 60) | @Override
    method visit (line 65) | @Override
    method visit (line 70) | @Override
    method visit (line 75) | private void visit(List<ValueExpression> veList) {
    method visit (line 80) | @Override
    method visit (line 85) | @Override
    method visit (line 90) | @Override
    method visit (line 95) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/IndexJoinHashVisitor.java
  class IndexJoinHashVisitor (line 98) | public class IndexJoinHashVisitor implements ExpressionVisitor,
    method IndexJoinHashVisitor (line 121) | protected IndexJoinHashVisitor() {
    method IndexJoinHashVisitor (line 127) | public IndexJoinHashVisitor(Schema schema, Component affectedComponent,
    method getExpressions (line 136) | public List<ValueExpression> getExpressions() {
    method pushToExprStack (line 140) | protected void pushToExprStack(ValueExpression ve) {
    method visit (line 148) | @Override
    method visit (line 160) | @Override
    method visit (line 165) | @Override
    method visit (line 170) | @Override
    method visit (line 175) | @Override
    method visit (line 180) | @Override
    method visit (line 185) | @Override
    method visit (line 190) | @Override
    method visit (line 195) | @Override
    method visit (line 200) | @Override
    method visit (line 220) | @Override
    method visit (line 225) | @Override
    method visit (line 232) | @Override
    method visit (line 246) | @Override
    method visit (line 253) | @Override
    method visit (line 259) | @Override
    method visit (line 264) | @Override
    method visit (line 273) | @Override
    method visit (line 305) | @Override
    method visit (line 310) | @Override
    method visit (line 315) | @Override
    method visit (line 320) | @Override
    method visit (line 325) | @Override
    method visit (line 330) | @Override
    method visit (line 335) | @Override
    method visit (line 340) | @Override
    method visit (line 346) | @Override
    method visit (line 351) | @Override
    method visit (line 356) | @Override
    method visit (line 361) | @Override
    method visit (line 373) | @Override
    method visit (line 379) | @Override
    method visit (line 385) | @Override
    method visit (line 390) | @Override
    method visit (line 395) | @Override
    method visit (line 401) | @Override
    method visit (line 406) | @Override
    method visit (line 418) | @Override
    method visit (line 423) | @Override
    method visit (line 428) | @Override
    method visitBinaryOperation (line 433) | private void visitBinaryOperation(BinaryExpression be) {
    method visitSideEquals (line 438) | private void visitSideEquals(Expression ex) {
    method visitUnsupportedOp (line 449) | private void visitUnsupportedOp() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/IndexSelectItemsVisitor.java
  class IndexSelectItemsVisitor (line 101) | public class IndexSelectItemsVisitor implements SelectItemVisitor,
    method IndexSelectItemsVisitor (line 133) | protected IndexSelectItemsVisitor(Map map) {
    method IndexSelectItemsVisitor (line 137) | public IndexSelectItemsVisitor(QueryBuilder queryPlan, Schema schema,
    method createCount (line 150) | protected void createCount(List<ValueExpression> veList, boolean isDis...
    method createSum (line 162) | protected void createSum(ValueExpression ve, boolean isDistinct) {
    method doneSingleItem (line 172) | private void doneSingleItem(Expression expr) {
    method getAggOps (line 180) | public List<AggregateOperator> getAggOps() {
    method getGroupByExprs (line 184) | public List<Expression> getGroupByExprs() {
    method getGroupByVEs (line 188) | public List<ValueExpression> getGroupByVEs() {
    method popFromExprStack (line 192) | protected ValueExpression popFromExprStack() {
    method pushToExprStack (line 196) | protected void pushToExprStack(ValueExpression ve) {
    method visit (line 204) | @Override
    method visit (line 217) | @Override
    method visit (line 225) | @Override
    method visit (line 230) | @Override
    method visit (line 237) | @Override
    method visit (line 242) | @Override
    method visit (line 247) | @Override
    method visit (line 252) | @Override
    method visit (line 257) | @Override
    method visit (line 262) | @Override
    method visit (line 267) | @Override
    method visit (line 272) | @Override
    method visit (line 285) | @Override
    method visit (line 290) | @Override
    method visit (line 297) | @Override
    method visit (line 309) | @Override
    method visit (line 316) | @Override
    method visit (line 321) | @Override
    method visit (line 326) | @Override
    method visit (line 336) | @Override
    method visit (line 375) | @Override
    method visit (line 380) | @Override
    method visit (line 385) | @Override
    method visit (line 390) | @Override
    method visit (line 395) | @Override
    method visit (line 400) | @Override
    method visit (line 405) | @Override
    method visit (line 410) | @Override
    method visit (line 416) | @Override
    method visit (line 421) | @Override
    method visit (line 426) | @Override
    method visit (line 431) | @Override
    method visit (line 443) | @Override
    method visit (line 449) | @Override
    method visit (line 454) | @Override
    method visit (line 459) | @Override
    method visit (line 464) | @Override
    method visit (line 473) | @Override
    method visit (line 479) | @Override
    method visit (line 484) | @Override
    method visit (line 497) | @Override
    method visit (line 502) | @Override
    method visit (line 507) | @Override
    method visitBinaryExpression (line 512) | public void visitBinaryExpression(BinaryExpression binaryExpression) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/IndexWhereVisitor.java
  class IndexWhereVisitor (line 97) | public class IndexWhereVisitor implements ExpressionVisitor, ItemsListVi...
    method IndexWhereVisitor (line 120) | protected IndexWhereVisitor() {
    method IndexWhereVisitor (line 123) | public IndexWhereVisitor(Component affectedComponent, Schema schema,
    method getSelectOperator (line 133) | public SelectOperator getSelectOperator() {
    method pushToExprStack (line 140) | protected void pushToExprStack(ValueExpression ve) {
    method visit (line 148) | @Override
    method visit (line 160) | @Override
    method visit (line 165) | @Override
    method visit (line 176) | @Override
    method visit (line 181) | @Override
    method visit (line 186) | @Override
    method visit (line 191) | @Override
    method visit (line 196) | @Override
    method visit (line 201) | @Override
    method visit (line 206) | @Override
    method visit (line 219) | @Override
    method visit (line 224) | @Override
    method visit (line 231) | @Override
    method visit (line 243) | @Override
    method visit (line 250) | @Override
    method visit (line 262) | @Override
    method visit (line 267) | @Override
    method visit (line 276) | @Override
    method visit (line 310) | @Override
    method visit (line 322) | @Override
    method visit (line 334) | @Override
    method visit (line 339) | @Override
    method visit (line 344) | @Override
    method visit (line 349) | @Override
    method visit (line 354) | @Override
    method visit (line 365) | @Override
    method visit (line 371) | @Override
    method visit (line 376) | @Override
    method visit (line 388) | @Override
    method visit (line 400) | @Override
    method visit (line 412) | @Override
    method visit (line 425) | @Override
    method visit (line 430) | @Override
    method visit (line 441) | @Override
    method visit (line 446) | @Override
    method visit (line 452) | @Override
    method visit (line 457) | @Override
    method visit (line 469) | @Override
    method visit (line 474) | @Override
    method visit (line 479) | @Override
    method visitBinaryOperation (line 484) | private void visitBinaryOperation(BinaryExpression be) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameJoinHashVisitor.java
  class NameJoinHashVisitor (line 41) | public class NameJoinHashVisitor extends IndexJoinHashVisitor {
    method NameJoinHashVisitor (line 47) | public NameJoinHashVisitor(TupleSchema tupleSchema,
    method isRecognized (line 59) | private <T extends Expression> boolean isRecognized(T expr) {
    method visit (line 73) | @Override
    method visit (line 83) | @Override
    method visit (line 104) | @Override
    method visit (line 111) | @Override
    method visit (line 118) | @Override
    method visit (line 125) | @Override
    method visit (line 132) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameProjectVisitor.java
  class NameProjectVisitor (line 91) | public class NameProjectVisitor implements ExpressionVisitor, ItemsListV...
    method NameProjectVisitor (line 107) | public NameProjectVisitor(TupleSchema inputTupleSchema,
    method getExprs (line 114) | public List<ValueExpression> getExprs() {
    method isRecognized (line 126) | private <T extends Expression> boolean isRecognized(T expr) {
    method pushToExprStack (line 140) | private void pushToExprStack(ValueExpression ve) {
    method visit (line 144) | @Override
    method visit (line 159) | @Override
    method visit (line 164) | @Override
    method visit (line 169) | @Override
    method visit (line 174) | @Override
    method visit (line 179) | @Override
    method visit (line 184) | @Override
    method visit (line 189) | @Override
    method visit (line 194) | @Override
    method visit (line 199) | @Override
    method visit (line 213) | @Override
    method visit (line 218) | @Override
    method visit (line 225) | @Override
    method visit (line 240) | @Override
    method visit (line 247) | @Override
    method visit (line 252) | @Override
    method visit (line 257) | @Override
    method visit (line 272) | @Override
    method visit (line 305) | @Override
    method visit (line 310) | @Override
    method visit (line 315) | @Override
    method visit (line 320) | @Override
    method visit (line 325) | @Override
    method visit (line 330) | @Override
    method visit (line 335) | @Override
    method visit (line 340) | public void visit(List<Expression> exprs) {
    method visit (line 345) | @Override
    method visit (line 351) | @Override
    method visit (line 356) | @Override
    method visit (line 361) | @Override
    method visit (line 366) | @Override
    method visit (line 381) | @Override
    method visit (line 387) | @Override
    method visit (line 392) | @Override
    method visit (line 397) | @Override
    method visit (line 405) | @Override
    method visit (line 411) | @Override
    method visit (line 416) | @Override
    method visit (line 431) | @Override
    method visit (line 436) | @Override
    method visit (line 441) | @Override
    method visitBinaryOperation (line 446) | private void visitBinaryOperation(BinaryExpression be) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameSelectItemsVisitor.java
  class NameSelectItemsVisitor (line 44) | public class NameSelectItemsVisitor extends IndexSelectItemsVisitor {
    method NameSelectItemsVisitor (line 51) | public NameSelectItemsVisitor(TupleSchema tupleSchema, Map map,
    method isRecognized (line 62) | private boolean isRecognized(ExpressionList params) {
    method isRecognized (line 86) | private <T extends Expression> boolean isRecognized(T expr) {
    method visit (line 100) | @Override
    method visit (line 110) | @Override
    method visit (line 133) | @Override
    method visit (line 140) | @Override
    method visit (line 188) | @Override
    method visit (line 195) | @Override
    method visit (line 202) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameWhereVisitor.java
  class NameWhereVisitor (line 38) | public class NameWhereVisitor extends IndexWhereVisitor {
    method NameWhereVisitor (line 43) | public NameWhereVisitor(TupleSchema tupleSchema, Component affectedCom...
    method isRecognized (line 53) | private <T extends Expression> boolean isRecognized(T expr) {
    method visit (line 67) | @Override
    method visit (line 77) | @Override
    method visit (line 91) | @Override
    method visit (line 98) | @Override
    method visit (line 105) | @Override
    method visit (line 112) | @Override
    method visit (line 119) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/VECollectPredVisitor.java
  class VECollectPredVisitor (line 35) | public class VECollectPredVisitor implements PredicateVisitor {
    method getExpressions (line 38) | public List<ValueExpression> getExpressions() {
    method visit (line 42) | @Override
    method visit (line 47) | @Override
    method visit (line 52) | @Override
    method visit (line 57) | @Override
    method visit (line 62) | @Override
    method visit (line 67) | private void visit(List<Predicate> predList) {
    method visit (line 72) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/VECollectVisitor.java
  class VECollectVisitor (line 46) | public class VECollectVisitor implements OperatorVisitor {
    method getAfterProjExpressions (line 51) | public List<ValueExpression> getAfterProjExpressions() {
    method getAllExpressions (line 55) | public List<ValueExpression> getAllExpressions() {
    method getBeforeProjExpressions (line 59) | public List<ValueExpression> getBeforeProjExpressions() {
    method visit (line 63) | @Override
    method visit (line 80) | @Override
    method visit (line 86) | public void visit(Component component) {
    method visit (line 101) | @Override
    method visit (line 107) | @Override
    method visit (line 112) | @Override
    method visit (line 117) | @Override
    method visit (line 124) | @Override
    method visit (line 129) | @Override
    method visit (line 135) | @Override
    method visit (line 140) | @Override
    method visit (line 145) | @Override
    method visitNested (line 154) | private void visitNested(DistinctOperator distinct) {
    method visitNested (line 160) | private void visitNested(ProjectOperator projection) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/AbstractComponent.java
  class AbstractComponent (line 35) | public abstract class AbstractComponent<C extends Component> implements ...
    method getThis (line 37) | protected abstract C getThis();
    method AbstractComponent (line 56) | public AbstractComponent(Component parent, String componentName) {
    method AbstractComponent (line 62) | public AbstractComponent(Component[] parents, String componentName) {
    method AbstractComponent (line 73) | public AbstractComponent(List<Component> parents, String componentName) {
    method AbstractComponent (line 77) | public AbstractComponent(Component[] parents) {
    method AbstractComponent (line 81) | public AbstractComponent(List<Component> parents) {
    method makeName (line 85) | private static String makeName(Component[] parents) {
    method getName (line 93) | @Override
    method getParents (line 98) | @Override
    method equals (line 103) | @Override
    method getBatchOutputMillis (line 111) | @Override
    method setBatchOutputMillis (line 117) | @Override
    method add (line 123) | @Override
    method getChainOperator (line 129) | @Override
    method getChild (line 134) | @Override
    method setChild (line 139) | @Override
    method getHashExpressions (line 144) | @Override
    method setHashExpressions (line 149) | @Override
    method getHashIndexes (line 156) | @Override
    method getPrintOut (line 161) | @Override
    method getPrintOutSet (line 166) | protected boolean getPrintOutSet() {
    method setPrintOut (line 170) | @Override
    method hashCode (line 177) | @Override
    method setContentSensitiveThetaJoinWrapper (line 185) | @Override
    method setOutputPartKey (line 190) | @Override
    method setOutputPartKey (line 195) | @Override
    method getEmitterIDs (line 202) | @Override
    method getInfoID (line 207) | @Override
    method setStormEmitter (line 212) | protected void setStormEmitter(StormEmitter emitter) {
    method getStormEmitter (line 216) | protected StormEmitter getStormEmitter(StormEmitter emitter) {
    method getAncestorDataSources (line 220) | @Override
    method getFullHashList (line 228) | @Override
    method setFullHashList (line 235) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/AbstractJoinerComponent.java
  class AbstractJoinerComponent (line 27) | public abstract class AbstractJoinerComponent<C extends JoinerComponent>...
    method AbstractJoinerComponent (line 37) | public AbstractJoinerComponent(Component parent, String componentName) {
    method AbstractJoinerComponent (line 41) | public AbstractJoinerComponent(Component[] parents, String componentNa...
    method AbstractJoinerComponent (line 45) | public AbstractJoinerComponent(List<Component> parents, String compone...
    method AbstractJoinerComponent (line 49) | public AbstractJoinerComponent(Component[] parents) {
    method AbstractJoinerComponent (line 53) | public AbstractJoinerComponent(List<Component> parents) {
    method setSlidingWindow (line 57) | @Override
    method getSlidingWindow (line 67) | @Override
    method setTumblingWindow (line 72) | @Override
    method getTumblingWindow (line 79) | @Override
    method getJoinPredicate (line 84) | @Override
    method setJoinPredicate (line 89) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/Component.java
  type Component (line 33) | public interface Component extends Serializable, ComponentProperties,
    method add (line 36) | public Component add(Operator operator);
    method makeBolts (line 39) | public void makeBolts(TopologyBuilder builder, TopologyKiller killer,
    method setBatchOutputMillis (line 43) | public Component setBatchOutputMillis(long millis);
    method setChild (line 46) | public void setChild(Component child);
    method setContentSensitiveThetaJoinWrapper (line 48) | public Component setContentSensitiveThetaJoinWrapper(Type wrapper);
    method setFullHashList (line 52) | public Component setFullHashList(List<String> fullHashList);
    method setHashExpressions (line 54) | public Component setHashExpressions(List<ValueExpression> hashExpressi...
    method setOutputPartKey (line 56) | public Component setOutputPartKey(int... hashIndexes);
    method setOutputPartKey (line 62) | public Component setOutputPartKey(List<Integer> hashIndexes);
    method setPrintOut (line 64) | public Component setPrintOut(boolean printOut);

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/ComponentProperties.java
  type ComponentProperties (line 28) | public interface ComponentProperties extends Serializable {
    method getAncestorDataSources (line 30) | public List<DataSourceComponent> getAncestorDataSources();
    method getBatchOutputMillis (line 32) | public long getBatchOutputMillis();
    method getChainOperator (line 34) | public ChainOperator getChainOperator();
    method getChild (line 38) | public Component getChild();
    method getFullHashList (line 40) | public List<String> getFullHashList();
    method getHashExpressions (line 42) | public List<ValueExpression> getHashExpressions();
    method getHashIndexes (line 44) | public List<Integer> getHashIndexes();
    method getInfoID (line 46) | public String getInfoID();
    method getName (line 48) | public String getName();
    method getParents (line 50) | public Component[] getParents();
    method getPrintOut (line 52) | public boolean getPrintOut();

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/DataSourceComponent.java
  class DataSourceComponent (line 38) | public class DataSourceComponent extends AbstractComponent<DataSourceCom...
    method getThis (line 39) | protected DataSourceComponent getThis() {
    method DataSourceComponent (line 54) | public DataSourceComponent(String tableName, Map conf) {
    method DataSourceComponent (line 61) | public DataSourceComponent(String componentName, String inputPath) {
    method DataSourceComponent (line 65) | public DataSourceComponent(String componentName, String inputPath, Map...
    method DataSourceComponent (line 71) | public DataSourceComponent(String componentName, ReaderProvider provid...
    method getAncestorDataSources (line 77) | @Override
    method makeBolts (line 84) | @Override
    method setBatchOutputMillis (line 109) | @Override
    method setFullHashList (line 117) | @Override
    method getFullHashList (line 123) | @Override
    method setPartitioner (line 129) | public DataSourceComponent setPartitioner(boolean isPartitioner) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/EquiJoinComponent.java
  class EquiJoinComponent (line 39) | public class EquiJoinComponent extends AbstractJoinerComponent<EquiJoinC...
    method getThis (line 40) | protected EquiJoinComponent getThis() {
    method EquiJoinComponent (line 60) | public EquiJoinComponent(Component firstParent, Component secondParent) {
    method EquiJoinComponent (line 64) | public EquiJoinComponent(Component firstParent, Component secondParent,
    method EquiJoinComponent (line 72) | public EquiJoinComponent(Component firstParent, int firstJoinIndex,
    method makeBolts (line 79) | @Override
    method setFirstPreAggProj (line 125) | public EquiJoinComponent setFirstPreAggProj(ProjectOperator firstPreAg...
    method setFirstPreAggStorage (line 131) | public EquiJoinComponent setFirstPreAggStorage(
    method setSecondPreAggProj (line 138) | public EquiJoinComponent setSecondPreAggProj(
    method setSecondPreAggStorage (line 144) | public EquiJoinComponent setSecondPreAggStorage(

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/JoinerComponent.java
  type JoinerComponent (line 29) | public interface JoinerComponent extends Component {
    method setSlidingWindow (line 30) | public JoinerComponent setSlidingWindow(int windowRange);
    method getSlidingWindow (line 31) | public long getSlidingWindow();
    method setTumblingWindow (line 33) | public JoinerComponent setTumblingWindow(int windowRange);
    method getTumblingWindow (line 34) | public long getTumblingWindow();
    method setJoinPredicate (line 36) | public JoinerComponent setJoinPredicate(Predicate joinPredicate);
    method getJoinPredicate (line 37) | public Predicate getJoinPredicate();
    method add (line 43) | public JoinerComponent add(Operator operator);
    method setBatchOutputMillis (line 44) | public JoinerComponent setBatchOutputMillis(long millis);
    method setContentSensitiveThetaJoinWrapper (line 45) | public JoinerComponent setContentSensitiveThetaJoinWrapper(Type wrapper);
    method setFullHashList (line 46) | public JoinerComponent setFullHashList(List<String> fullHashList);
    method setHashExpressions (line 47) | public JoinerComponent setHashExpressions(List<ValueExpression> hashEx...
    method setOutputPartKey (line 48) | public JoinerComponent setOutputPartKey(int... hashIndexes);
    method setOutputPartKey (line 49) | public JoinerComponent setOutputPartKey(List<Integer> hashIndexes);
    method setPrintOut (line 50) | public JoinerComponent setPrintOut(boolean printOut);

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/OperatorComponent.java
  class OperatorComponent (line 40) | public class OperatorComponent extends AbstractComponent<OperatorCompone...
    method getThis (line 41) | protected OperatorComponent getThis() {
    method OperatorComponent (line 50) | public OperatorComponent(Component parent, String componentName) {
    method OperatorComponent (line 54) | public OperatorComponent(ArrayList<Component> parents, String componen...
    method makeBolts (line 58) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/hyper_cube/HyperCubeJoinComponent.java
  class HyperCubeJoinComponent (line 43) | public class HyperCubeJoinComponent extends AbstractJoinerComponent<Hype...
    method getThis (line 44) | protected HyperCubeJoinComponent getThis() {
    method HyperCubeJoinComponent (line 57) | public HyperCubeJoinComponent(Component[] parents,
    method getFullHashList (line 69) | @Override
    method makeBolts (line 75) | @Override
    method setFullHashList (line 92) | @Override
    method setContentSensitiveThetaJoinWrapper (line 98) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/hyper_cube/HyperCubeJoinComponentFactory.java
  class HyperCubeJoinComponentFactory (line 33) | public class HyperCubeJoinComponentFactory {
    method addRelation (line 42) | public void addRelation(Component relation, Type... types) {
    method addRelation (line 47) | public void addRelation(Component relation, Type[] types, String[] col...
    method addRelation (line 52) | public void addRelation(Component relation,
    method HyperCubeJoinComponentFactory (line 64) | public HyperCubeJoinComponentFactory(Component[] parents) {
    method addPredicate (line 69) | public void addPredicate(String key, Predicate pred) {
    method createHyperCubeJoinOperator (line 73) | public HyperCubeJoinComponent createHyperCubeJoinOperator() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/theta/AdaptiveThetaJoinComponent.java
  class AdaptiveThetaJoinComponent (line 52) | public class AdaptiveThetaJoinComponent extends AbstractJoinerComponent<...
    method getThis (line 53) | protected AdaptiveThetaJoinComponent getThis() {
    method AdaptiveThetaJoinComponent (line 65) | public AdaptiveThetaJoinComponent(Component firstParent,
    method AdaptiveThetaJoinComponent (line 73) | public AdaptiveThetaJoinComponent(Component firstParent) {
    method getFullHashList (line 79) | @Override
    method makeBolts (line 85) | @Override
    method setContentSensitiveThetaJoinWrapper (line 179) | @Override
    method setFullHashList (line 186) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/theta/ThetaJoinComponent.java
  class ThetaJoinComponent (line 42) | public class ThetaJoinComponent extends AbstractJoinerComponent<ThetaJoi...
    method getThis (line 43) | protected ThetaJoinComponent getThis() {
    method ThetaJoinComponent (line 63) | public ThetaJoinComponent(Component firstParent, Component secondParent,
    method ThetaJoinComponent (line 71) | public ThetaJoinComponent(Component firstParent, Component secondParent,
    method getFullHashList (line 88) | @Override
    method makeBolts (line 94) | @Override
    method setContentSensitiveThetaJoinWrapper (line 137) | @Override
    method setFullHashList (line 145) | @Override
    method setPartitioner (line 151) | public ThetaJoinComponent setPartitioner(boolean isPartitioner) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/components/theta/ThetaJoinComponentFactory.java
  class ThetaJoinComponentFactory (line 36) | public class ThetaJoinComponentFactory {
    method ThetaJoinComponentFactory (line 46) | public ThetaJoinComponentFactory(Map conf) {
    method ThetaJoinComponentFactory (line 50) | public ThetaJoinComponentFactory() {
    method addRelation (line 54) | public void addRelation(Component relation, Type... types) {
    method addRelation (line 59) | public void addRelation(Component relation, Type[] types, String[] col...
    method addRelation (line 64) | public void addRelation(Component relation,
    method createThetaJoinOperator (line 75) | public JoinerComponent createThetaJoinOperator(Component firstParent, ...
    method createThetaJoinOperator (line 86) | public static JoinerComponent createThetaJoinOperator(int thetaJoinType,

FILE: squall-core/src/main/java/ch/epfl/data/squall/connectors/hdfs/HDFSmaterializer.java
  class HDFSmaterializer (line 53) | public class HDFSmaterializer implements Component {
    method HDFSmaterializer (line 77) | public HDFSmaterializer(Component parent, String componentName,
    method createHDFSmaterializer (line 88) | public BaseRichBolt createHDFSmaterializer(String hdfsPath) {
    method add (line 108) | @Override
    method equals (line 114) | @Override
    method getAncestorDataSources (line 122) | @Override
    method getBatchOutputMillis (line 129) | @Override
    method getChainOperator (line 134) | @Override
    method getChild (line 139) | @Override
    method getEmitterIDs (line 145) | @Override
    method getFullHashList (line 150) | @Override
    method getHashExpressions (line 155) | @Override
    method getHashIndexes (line 160) | @Override
    method getInfoID (line 165) | @Override
    method getName (line 170) | @Override
    method getParents (line 175) | @Override
    method getPrintOut (line 180) | @Override
    method hashCode (line 185) | @Override
    method makeBolts (line 193) | @Override
    method setBatchOutputMillis (line 213) | @Override
    method setChild (line 219) | @Override
    method setContentSensitiveThetaJoinWrapper (line 224) | @Override
    method setFullHashList (line 229) | @Override
    method setHashExpressions (line 235) | @Override
    method setOutputPartKey (line 242) | @Override
    method setOutputPartKey (line 247) | @Override
    method setPrintOut (line 253) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/BSPAlgorithm.java
  class BSPAlgorithm (line 62) | public class BSPAlgorithm implements TilingAlgorithm {
    type COVERAGE_MODE (line 99) | public enum COVERAGE_MODE {
    type DIVISION_MODE (line 108) | public enum DIVISION_MODE {
    method BSPAlgorithm (line 124) | private BSPAlgorithm(Map map, int j, WeightFunction wf) {
    method BSPAlgorithm (line 131) | public BSPAlgorithm(Map map, int j, WeightFunction wf,
    method BSPAlgorithm (line 137) | public BSPAlgorithm(Map map, int j, WeightFunction wf,
    method getPrecomputation (line 143) | @Override
    method getWeightFunction (line 148) | @Override
    method getWeight (line 155) | @Override
    method partition (line 160) | @Override
    method assignNonZeroToRoundedCandidates (line 258) | private int assignNonZeroToRoundedCandidates(
    method recomputePrecomputation (line 291) | private WeightPrecomputation recomputePrecomputation(JoinMatrix joinMa...
    method binarySearch (line 351) | private List<Region> binarySearch(JoinMatrix joinMatrix) {
    method drtile (line 547) | private Map<String, RegionPartitioning> drtile(double maxWeight,
    method partitionRegion (line 593) | private void partitionRegion(Region originalRegion, double maxWeight,
    method addRegionWithPartitioning (line 622) | private void addRegionWithPartitioning(Region region, double maxWeight,
    method findFirstDifferentRightNeighborHor (line 876) | private int findFirstDifferentRightNeighborHor(int x1, int y1, int x2,
    method findFirstDifferentRightNeighborVer (line 906) | private int findFirstDifferentRightNeighborVer(int x1, int y1, int x2,
    method createRegionHashNumCoarsened (line 946) | private RegionHashNumRectangles createRegionHashNumCoarsened(int x1,
    method toString (line 962) | @Override
    method getNumJoiners (line 968) | private int getNumJoiners(Map<String, RegionPartitioning> regPart,
    method getNumJoinersCoarsened (line 997) | private int getNumJoinersCoarsened(Map<String, RegionPartitioning> reg...
    method getRegions (line 1038) | private List<Region> getRegions(Map<String, RegionPartitioning> regPart,
    method getCoarsenedRegionMatrixHash (line 1098) | private String getCoarsenedRegionMatrixHash(
    method getEnclosingRegion (line 1114) | public Region getEnclosingRegion(Region scc) {
    method isUnitSize (line 1129) | public boolean isUnitSize(int cx1, int cy1, int cx2, int cy2) {
    method getGridCells (line 1135) | public List<Region> getGridCells() {
    method precomputeSegmentExtremes (line 1155) | private void precomputeSegmentExtremes(JoinMatrix joinMatrix) {
    method findCandSegment (line 1229) | private ExtremePositions findCandSegment(Segment segment) {
    method generateSCCCoarsenedRegions (line 1256) | private SortedMap<Integer, List<Region>> generateSCCCoarsenedRegions() {
    method addToCollection (line 1306) | private void addToCollection(SortedMap<Integer, List<Region>> collection,
    class RegionPartitioning (line 1321) | public class RegionPartitioning {
      method RegionPartitioning (line 1330) | public RegionPartitioning(Region region) {
      method RegionPartitioning (line 1337) | public RegionPartitioning(Region region, String bestFirstSubregionHash,
      method getRegion (line 1345) | public Region getRegion() {
      method getNumRectangles (line 1349) | public int getNumRectangles() {
      method getBestFirstSubregionHash (line 1353) | public String getBestFirstSubregionHash() {
      method getBestSecondSubregionHash (line 1357) | public String getBestSecondSubregionHash() {
      method getRectangles (line 1362) | public List<Region> getRectangles(
      method addRectangles (line 1373) | private void addRectangles(List<Region> allRegions,
    class Segment (line 1450) | private class Segment {
      method Segment (line 1454) | public Segment(int lowerPos, int upperPos) {
      method Segment (line 1459) | public Segment(String hash) {
      method getLowerPos (line 1465) | public int getLowerPos() {
      method getUpperPos (line 1469) | public int getUpperPos() {
      method setLowerPos (line 1473) | public void setLowerPos(int lowerPos) {
      method setUpperPos (line 1477) | public void setUpperPos(int upperPos) {
      method toString (line 1481) | @Override
      method hashCode (line 1486) | @Override
      method equals (line 1496) | @Override
      method getOuterType (line 1514) | private BSPAlgorithm getOuterType() {
    class RegionHashNumRectangles (line 1519) | private class RegionHashNumRectangles {
      method RegionHashNumRectangles (line 1523) | public RegionHashNumRectangles(String regionHash, int numRectangles) {
      method getRegionHash (line 1528) | public String getRegionHash() {
      method getNumRectangles (line 1532) | public int getNumRectangles() {
      method setRegionHash (line 1536) | public void setRegionHash(String regionHash) {
      method setNumRectangles (line 1540) | public void setNumRectangles(int numRectangles) {
    method getShortName (line 1545) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/DenseMonotonicWeightPrecomputation.java
  class DenseMonotonicWeightPrecomputation (line 40) | public class DenseMonotonicWeightPrecomputation implements WeightPrecomp...
    method DenseMonotonicWeightPrecomputation (line 59) | public DenseMonotonicWeightPrecomputation(WeightFunction wf,
    method DenseMonotonicWeightPrecomputation (line 70) | public DenseMonotonicWeightPrecomputation(WeightFunction wf,
    method getWeightFunction (line 82) | @Override
    method getXSize (line 87) | @Override
    method getYSize (line 92) | @Override
    method getWeight (line 100) | @Override
    method isEmpty (line 105) | @Override
    method getFrequency (line 110) | @Override
    method getTotalFrequency (line 127) | @Override
    method toString (line 132) | @Override
    method precompute (line 137) | private void precompute() {
    method choosePrefixSumType (line 227) | private void choosePrefixSumType() {
    method computePrefix (line 266) | private void computePrefix(int x1, int y1, int x2, int y2) {
    method computePrefixUp (line 283) | private int computePrefixUp(int originalXBeginBucket, int originalX,
    method getPrefixSum (line 302) | @Override
    method getMinHalfPerimeterForWeight (line 329) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/DenseWeightPrecomputation.java
  class DenseWeightPrecomputation (line 30) | public class DenseWeightPrecomputation implements WeightPrecomputation {
    method DenseWeightPrecomputation (line 39) | public DenseWeightPrecomputation(WeightFunction wf, SimpleMatrix input...
    method getWeightFunction (line 49) | @Override
    method getXSize (line 54) | @Override
    method getYSize (line 59) | @Override
    method getWeight (line 67) | @Override
    method isEmpty (line 72) | @Override
    method getFrequency (line 77) | @Override
    method getTotalFrequency (line 94) | @Override
    method toString (line 99) | @Override
    method precompute (line 105) | private void precompute() {
    method getPrefixSum (line 120) | @Override
    method getMinHalfPerimeterForWeight (line 129) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/InputOutputShallowCoarsener.java
  class InputOutputShallowCoarsener (line 30) | public class InputOutputShallowCoarsener extends OutputShallowCoarsener {
    method InputOutputShallowCoarsener (line 34) | public InputOutputShallowCoarsener(int numXBuckets, int numYBuckets,
    method InputOutputShallowCoarsener (line 39) | public InputOutputShallowCoarsener(int numXBuckets, int numYBuckets,
    method computeMaxGridCellWeight (line 46) | @Override
    method getWeight (line 64) | @Override
    method getWeightEmpty0 (line 106) | @Override
    method toString (line 120) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/InputShallowCoarsener.java
  class InputShallowCoarsener (line 52) | public class InputShallowCoarsener extends ShallowCoarsener {
    method InputShallowCoarsener (line 61) | public InputShallowCoarsener(int numXBuckets, int numYBuckets) {
    method setOriginalMatrix (line 67) | @Override
    method getPrecomputation (line 94) | @Override
    method getNumXCoarsenedPoints (line 100) | @Override
    method getNumYCoarsenedPoints (line 105) | @Override
    method getOriginalXCoordinate (line 110) | @Override
    method getOriginalYCoordinate (line 134) | @Override
    method getCoarsenedXCoordinate (line 158) | @Override
    method getCoarsenedYCoordinate (line 169) | @Override
    method toString (line 180) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/MCMCRandomWalkAlgorithm.java
  class MCMCRandomWalkAlgorithm (line 38) | public class MCMCRandomWalkAlgorithm implements TilingAlgorithm {
    method MCMCRandomWalkAlgorithm (line 48) | public MCMCRandomWalkAlgorithm(Map map, int j) {
    method getPrecomputation (line 53) | @Override
    method getWeightFunction (line 58) | @Override
    method getWeight (line 63) | @Override
    method partition (line 68) | @Override
    method initializeRegions (line 119) | private static List<Region> initializeRegions(JoinMatrix joinMatrix) {
    method chooseRegion (line 127) | private static int chooseRegion(List<Region> regions, double avgWeight) {
    method randomShift (line 143) | private Region randomShift(Region region, WeightPrecomputation wf,
    method getChangeDirection (line 186) | public TwoBoolean getChangeDirection(int cornerNum, boolean isSmallerW...
    method generateShift (line 219) | private int generateShift(int dimSize, boolean toReduce) {
    method putWithinMatrix (line 241) | private Point putWithinMatrix(Point corner, int xSize, int ySize) {
    method putWithinMatrixDim (line 247) | private int putWithinMatrixDim(int position, int size) {
    method adjustRegions (line 265) | private static List<Region> adjustRegions(List<Region> regions,
    method isAccept (line 274) | private boolean isAccept(double alpha) {
    method getAvgWeight (line 284) | private static double getAvgWeight(List<Region> regions,
    method getLstWeight (line 293) | private static double getLstWeight(List<Region> regions,
    method getAvgRegionDensity (line 303) | private static double getAvgRegionDensity(List<Region> regions,
    class RegionXComparator (line 315) | public static class RegionXComparator implements Comparator<Region> {
      method compare (line 316) | @Override
    class RegionYComparator (line 328) | public static class RegionYComparator implements Comparator<Region> {
      method compare (line 329) | @Override
    class RegionWeightComparator (line 341) | public static class RegionWeightComparator implements Comparator<Regio...
      method RegionWeightComparator (line 344) | public RegionWeightComparator(WeightPrecomputation wf) {
      method compare (line 348) | @Override
    method getShortName (line 360) | @Override
    class Goodness (line 365) | private static class Goodness {
      method Goodness (line 376) | public Goodness(JoinMatrix joinMatrix, List<Region> regions,
      method compare (line 393) | public double compare(Goodness other) {
    class SpatialRegions (line 404) | private static class SpatialRegions {
      method SpatialRegions (line 409) | public SpatialRegions(List<Region> regions) {
      method isIntersect (line 424) | public boolean isIntersect(Region region) {
    class TwoBoolean (line 429) | public static class TwoBoolean {
      method TwoBoolean (line 433) | public TwoBoolean(boolean first, boolean second) {
      method getFirst (line 438) | public boolean getFirst() {
      method getSecond (line 442) | public boolean getSecond() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanAlgorithm.java
  class OkcanAlgorithm (line 38) | public abstract class OkcanAlgorithm implements TilingAlgorithm {
    method OkcanAlgorithm (line 62) | public OkcanAlgorithm(int j, int numXBuckets, int numYBuckets, Map map,
    method partition (line 78) | @Override
    method getCoarsenedRegions (line 130) | private List<Region> getCoarsenedRegions(JoinMatrix coarsenedMatrix,
    method binarySearch (line 139) | private List<Region> binarySearch(int lowerBound, int upperBound,
    method mBucket (line 193) | private BooleanRegions mBucket(int maxWeight, int numOfRegions,
    method coverSubMatrix (line 227) | private CurrentRowRegions coverSubMatrix(int currentRow, int maxWeight,
    method coverRows (line 276) | private List<Region> coverRows(int firstRow, int lastRow, int maxWeight,
    method mergeRegions (line 337) | private static Region mergeRegions(Region originalRegion, Region newRe...
    method getOuterColumnCandidates (line 378) | private BooleanRegion getOuterColumnCandidates(int firstRow, int lastRow,
    method getSumOfFrequencies (line 440) | private static int getSumOfFrequencies(List<Region> regions) {
    method precomputeRowExtremes (line 454) | private void precomputeRowExtremes() {
    method precomputeColumnExtremes (line 492) | private void precomputeColumnExtremes() {
    method toString (line 530) | @Override
    method getCoarsener (line 536) | protected OkcanCoarsener getCoarsener() {
    method getWeightLowerBound (line 543) | protected abstract int getWeightLowerBound(JoinMatrix coarsenedMatrix,
    method getWeightUpperBound (line 549) | protected abstract int getWeightUpperBound(JoinMatrix coarsenedMatrix,
    class BooleanRegion (line 552) | private static class BooleanRegion {
      method BooleanRegion (line 556) | public BooleanRegion(boolean satisfied, Region region) {
      method isSatisfied (line 561) | public boolean isSatisfied() {
      method setSatisfied (line 565) | public void setSatisfied(boolean satisfied) {
      method getRegion (line 569) | public Region getRegion() {
      method setRegion (line 573) | public void setRegion(Region region) {
    class CurrentRowRegions (line 578) | private static class CurrentRowRegions {
      method CurrentRowRegions (line 582) | public CurrentRowRegions(int currentRow, List<Region> regions) {
      method getCurrentRow (line 587) | public int getCurrentRow() {
      method setCurrentRow (line 591) | public void setCurrentRow(int currentRow) {
      method getRegions (line 595) | public List<Region> getRegions() {
      method setRegions (line 599) | public void setRegions(List<Region> regions) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCandidateCoarsener.java
  class OkcanCandidateCoarsener (line 34) | public class OkcanCandidateCoarsener implements OkcanCoarsener {
    method setParameters (line 46) | protected void setParameters(JoinMatrix originalMatrix, int numXBuckets,
    method createAndFillCoarsenedMatrix (line 69) | @Override
    method translateCoarsenedToOriginalRegions (line 118) | @Override
    method translateCoarsenedToOriginalRegion (line 136) | @Override
    method getOriginalXCoordinate (line 152) | @Override
    method getOriginalYCoordinate (line 176) | @Override
    method getOriginalXSize (line 200) | @Override
    method getOriginalYSize (line 205) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCandidateInputAlgorithm.java
  class OkcanCandidateInputAlgorithm (line 28) | public class OkcanCandidateInputAlgorithm extends OkcanAlgorithm {
    method OkcanCandidateInputAlgorithm (line 32) | public OkcanCandidateInputAlgorithm(int j, WeightFunction wf,
    method getWeight (line 39) | @Override
    method getWeightLowerBound (line 50) | @Override
    method getWeightUpperBound (line 57) | @Override
    method toString (line 66) | @Override
    method getPrecomputation (line 71) | @Override
    method getWeightFunction (line 76) | @Override
    method getShortName (line 81) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCandidateOutputAlgorithm.java
  class OkcanCandidateOutputAlgorithm (line 28) | public class OkcanCandidateOutputAlgorithm extends OkcanAlgorithm {
    method OkcanCandidateOutputAlgorithm (line 32) | public OkcanCandidateOutputAlgorithm(int j, WeightFunction wf,
    method getWeight (line 39) | @Override
    method getWeightLowerBound (line 44) | @Override
    method getWeightUpperBound (line 50) | @Override
    method toString (line 57) | @Override
    method getPrecomputation (line 62) | @Override
    method getWeightFunction (line 67) | @Override
    method getShortName (line 72) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCoarsener.java
  type OkcanCoarsener (line 28) | public interface OkcanCoarsener {
    method createAndFillCoarsenedMatrix (line 29) | public JoinMatrix createAndFillCoarsenedMatrix(JoinMatrix originalMatrix,
    method translateCoarsenedToOriginalRegion (line 32) | public Region translateCoarsenedToOriginalRegion(Region coarsenedRegion);
    method translateCoarsenedToOriginalRegions (line 34) | public List<Region> translateCoarsenedToOriginalRegions(
    method getOriginalXCoordinate (line 37) | public int getOriginalXCoordinate(int cx, boolean isHigher);
    method getOriginalYCoordinate (line 39) | public int getOriginalYCoordinate(int cy, boolean isHigher);
    method getOriginalXSize (line 41) | public int getOriginalXSize();
    method getOriginalYSize (line 43) | public int getOriginalYSize();

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanExactCoarsener.java
  class OkcanExactCoarsener (line 33) | public class OkcanExactCoarsener extends OkcanCandidateCoarsener {
    method createAndFillCoarsenedMatrix (line 36) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanExactInputAlgorithm.java
  class OkcanExactInputAlgorithm (line 28) | public class OkcanExactInputAlgorithm extends OkcanAlgorithm {
    method OkcanExactInputAlgorithm (line 32) | public OkcanExactInputAlgorithm(int j, WeightFunction wf, int numXBuck...
    method getWeight (line 39) | @Override
    method getWeightLowerBound (line 52) | @Override
    method getWeightUpperBound (line 65) | @Override
    method toString (line 73) | @Override
    method getPrecomputation (line 78) | @Override
    method getWeightFunction (line 83) | @Override
    method getShortName (line 88) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanExactOutputAlgorithm.java
  class OkcanExactOutputAlgorithm (line 28) | public class OkcanExactOutputAlgorithm extends OkcanAlgorithm {
    method OkcanExactOutputAlgorithm (line 32) | public OkcanExactOutputAlgorithm(int j, WeightFunction wf, int numXBuc...
    method getWeight (line 39) | @Override
    method getWeightLowerBound (line 44) | @Override
    method getWeightUpperBound (line 50) | @Override
    method toString (line 57) | @Override
    method getPrecomputation (line 62) | @Override
    method getWeightFunction (line 67) | @Override
    method getShortName (line 72) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OutputShallowCoarsener.java
  class OutputShallowCoarsener (line 67) | public class OutputShallowCoarsener extends ShallowCoarsener {
    type ADJUST_MODE (line 89) | protected enum ADJUST_MODE {
    type ITER_MODE (line 111) | protected enum ITER_MODE {
    method OutputShallowCoarsener (line 140) | public OutputShallowCoarsener(int numXBuckets, int numYBuckets,
    method OutputShallowCoarsener (line 159) | public OutputShallowCoarsener(int numXBuckets, int numYBuckets,
    method setIModeConf (line 168) | private void setIModeConf() {
    method setOriginalMatrix (line 185) | @Override
    method computeCoarsenedMatrix (line 231) | private void computeCoarsenedMatrix(StringBuilder sb) {
    method initializeRowColumnWeights (line 315) | private void initializeRowColumnWeights() {
    method computeAlphaGoodPartitioning (line 334) | private void computeAlphaGoodPartitioning(int iteration) {
    method computeAlphaGoodPartitioning (line 358) | private List<BucketBoundary> computeAlphaGoodPartitioning(
    method adjustToNumBuckets (line 427) | private List<BucketBoundary> adjustToNumBuckets(List<Double> weights,
    method addSplit (line 483) | private void addSplit(List<Double> weights, List<BucketBoundary> result,
    method findMaxWeightRegion (line 511) | private Region findMaxWeightRegion(int iteration) {
    method findOverweighted (line 559) | private Region findOverweighted(double maxGridCellWeight, int iteratio...
    method multiplyWeights (line 597) | private void multiplyWeights(Region overweighted) {
    method computeMaxIter (line 637) | private int computeMaxIter() {
    method computeMaxGridCellWeight (line 647) | protected double computeMaxGridCellWeight() {
    method getWeight (line 660) | protected double getWeight(Region region) {
    method getWeightEmpty0 (line 666) | protected double getWeightEmpty0(Region region) {
    method getPrecomputation (line 670) | @Override
    method getNumXCoarsenedPoints (line 679) | @Override
    method getNumYCoarsenedPoints (line 684) | @Override
    method getOriginalXCoordinate (line 689) | @Override
    method getOriginalYCoordinate (line 698) | @Override
    method precomputeOriginalToCoarsened (line 708) | private void precomputeOriginalToCoarsened() {
    method precomputeOriginalToCoarsened (line 713) | private void precomputeOriginalToCoarsened(List<BucketBoundary> bbList,
    method getCoarsenedXCoordinate (line 723) | @Override
    method getCoarsenedYCoordinate (line 755) | @Override
    method toString (line 787) | @Override
    method backupX (line 794) | private void backupX(int x1, int x2) {
    method backupY (line 804) | private void backupY(int y1, int y2) {
    method restoreX (line 815) | private void restoreX() {
    method restoreY (line 822) | private void restoreY() {
    method getSumElements (line 831) | private double getSumElements(List<Double> lst) {
    method getSumElements (line 840) | private double getSumElements(List<Double> lst, int start, int end) {
    method multiplyElement (line 848) | private double multiplyElement(List<Double> weights, int position,
    method findMin (line 856) | protected int findMin(int num1, int num2) {
    method getSeparators (line 864) | private List<Region> getSeparators() {
    method getSeparatorsString (line 884) | private String getSeparatorsString() {
    method main (line 902) | public static void main(String[] args) throws IOException {
    class BucketBoundary (line 948) | private class BucketBoundary {
      method BucketBoundary (line 954) | public BucketBoundary(int lowerPos, int upperPos) {
      method BucketBoundary (line 959) | public BucketBoundary(int lowerPos, int upperPos, double weight) {
      method BucketBoundary (line 964) | public BucketBoundary(BucketBoundary other) {
      method getLowerPos (line 971) | public int getLowerPos() {
      method setLowerPos (line 975) | public void setLowerPos(int lowerPos) {
      method getUpperPos (line 979) | public int getUpperPos() {
      method setUpperPos (line 983) | public void setUpperPos(int upperPos) {
      method setWeight (line 987) | public void setWeight(int weight) {
      method getWeight (line 991) | public double getWeight() {
      method setIndex (line 995) | public void setIndex(int index) {
      method getIndex (line 999) | public int getIndex() {
    class BBWeightComparator (line 1004) | private class BBWeightComparator implements Comparator<BucketBoundary> {
      method compare (line 1005) | @Override
    class BBIndexComparator (line 1017) | private class BBIndexComparator implements Comparator<BucketBoundary> {
      method compare (line 1018) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/PWeightPrecomputation.java
  class PWeightPrecomputation (line 29) | public class PWeightPrecomputation implements WeightPrecomputation {
    method PWeightPrecomputation (line 37) | public PWeightPrecomputation(WeightFunction wf, ShallowCoarsener sc,
    method getWeightFunction (line 48) | @Override
    method getXSize (line 53) | @Override
    method getYSize (line 58) | @Override
    method precomputePSquare (line 65) | private void precomputePSquare(WeightPrecomputation samplePrecomputati...
    method addDeltaMatrix (line 76) | public void addDeltaMatrix(SimpleMatrix deltaMatrix) {
    method getPrefixSum (line 89) | @Override
    method getWeight (line 103) | @Override
    method getFrequency (line 111) | @Override
    method isEmpty (line 132) | @Override
    method getTotalFrequency (line 137) | @Override
    method getMinHalfPerimeterForWeight (line 142) | @Override
    method toString (line 147) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/ShallowCoarsener.java
  class ShallowCoarsener (line 30) | public abstract class ShallowCoarsener {
    method setOriginalMatrix (line 33) | public abstract void setOriginalMatrix(JoinMatrix originalMatrix,
    method getPrecomputation (line 36) | public abstract WeightPrecomputation getPrecomputation();
    method getNumXCoarsenedPoints (line 38) | public abstract int getNumXCoarsenedPoints();
    method getNumYCoarsenedPoints (line 40) | public abstract int getNumYCoarsenedPoints();
    method getOriginalXCoordinate (line 42) | public abstract int getOriginalXCoordinate(int ci, boolean isHigher);
    method getOriginalYCoordinate (line 44) | public abstract int getOriginalYCoordinate(int cj, boolean isHigher);
    method getCoarsenedXCoordinate (line 46) | public abstract int getCoarsenedXCoordinate(int x);
    method getCoarsenedYCoordinate (line 48) | public abstract int getCoarsenedYCoordinate(int y);
    method translateCoarsenedToOriginalRegion (line 50) | public Region translateCoarsenedToOriginalRegion(Region coarsenedRegio...
    method translateOriginalToCoarsenedRegion (line 64) | public Region translateOriginalToCoarsenedRegion(Region originalRegion) {
    method getCandidateRoundedCells (line 80) | public List<Region> getCandidateRoundedCells(Map conf) {
    method getNumCandidateRoundedCells (line 101) | public int getNumCandidateRoundedCells(Map conf) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/TilingAlgorithm.java
  type TilingAlgorithm (line 28) | public interface TilingAlgorithm {
    method partition (line 31) | public List<Region> partition(JoinMatrix joinMatrix, StringBuilder sb);
    method getPrecomputation (line 34) | public WeightPrecomputation getPrecomputation();
    method getWeightFunction (line 39) | public WeightFunction getWeightFunction();
    method getWeight (line 41) | public double getWeight(Region region);
    method getShortName (line 43) | public String getShortName();

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/WeightPrecomputation.java
  type WeightPrecomputation (line 25) | public interface WeightPrecomputation {
    method getWeightFunction (line 27) | public WeightFunction getWeightFunction();
    method getXSize (line 30) | public int getXSize();
    method getYSize (line 32) | public int getYSize();
    method getWeight (line 34) | public double getWeight(Region region);
    method getFrequency (line 36) | public int getFrequency(Region region);
    method isEmpty (line 40) | public boolean isEmpty(Region region);
    method getTotalFrequency (line 42) | public int getTotalFrequency();
    method getMinHalfPerimeterForWeight (line 44) | public int getMinHalfPerimeterForWeight(double maxWeight);
    method getPrefixSum (line 46) | public int getPrefixSum(int x, int y);

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/optimality/MaxAvgOptimality.java
  class MaxAvgOptimality (line 31) | public class MaxAvgOptimality implements OptimalityMetricInterface {
    method MaxAvgOptimality (line 41) | private MaxAvgOptimality(JoinMatrix joinMatrix, List<Region> regions) {
    method MaxAvgOptimality (line 46) | public MaxAvgOptimality(JoinMatrix joinMatrix, List<Region> regions,
    method MaxAvgOptimality (line 53) | public MaxAvgOptimality(JoinMatrix joinMatrix, List<Region> regions,
    method getOptimalityDistance (line 59) | @Override
    method toString (line 75) | @Override
    method getWeight (line 90) | @Override
    method getActualMaxRegionWeight (line 103) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/optimality/OptimalityMetricInterface.java
  type OptimalityMetricInterface (line 24) | public interface OptimalityMetricInterface {
    method getOptimalityDistance (line 30) | public double getOptimalityDistance();
    method getWeight (line 33) | public double getWeight(Region region);
    method getActualMaxRegionWeight (line 36) | public double getActualMaxRegionWeight();

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/optimality/WeightFunction.java
  class WeightFunction (line 22) | public class WeightFunction {
    method WeightFunction (line 26) | public WeightFunction(double a, double b) {
    method getWeight (line 31) | public double getWeight(int halfPerimeter, int frequency) {
    method toString (line 35) | @Override
    method getA (line 40) | public double getA() {
    method getB (line 45) | public double getB() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/components/DummyComponent.java
  class DummyComponent (line 48) | public class DummyComponent implements Component {
    method DummyComponent (line 70) | public DummyComponent(Component parent, String componentName) {
    method add (line 77) | @Override
    method equals (line 83) | @Override
    method getAncestorDataSources (line 91) | @Override
    method getBatchOutputMillis (line 98) | @Override
    method getChainOperator (line 103) | @Override
    method getChild (line 108) | @Override
    method getEmitterIDs (line 114) | @Override
    method getFullHashList (line 119) | @Override
    method getHashExpressions (line 124) | @Override
    method getHashIndexes (line 129) | @Override
    method getInfoID (line 134) | @Override
    method getName (line 139) | @Override
    method getParents (line 144) | @Override
    method getPrintOut (line 149) | @Override
    method hashCode (line 154) | @Override
    method makeBolts (line 162) | @Override
    method setBatchOutputMillis (line 179) | @Override
    method setChild (line 185) | @Override
    method setFullHashList (line 190) | @Override
    method setHashExpressions (line 196) | @Override
    method setOutputPartKey (line 203) | @Override
    method setOutputPartKey (line 209) | @Override
    method setPrintOut (line 215) | @Override
    method setContentSensitiveThetaJoinWrapper (line 222) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/components/EWHSampleMatrixComponent.java
  class EWHSampleMatrixComponent (line 50) | public class EWHSampleMatrixComponent implements Component {
    method EWHSampleMatrixComponent (line 67) | public EWHSampleMatrixComponent(Component firstParent,
    method getName (line 88) | @Override
    method setChild (line 93) | @Override
    method getChild (line 98) | @Override
    method getParents (line 103) | @Override
    method getAncestorDataSources (line 108) | @Override
    method equals (line 116) | @Override
    method hashCode (line 124) | @Override
    method makeBolts (line 132) | @Override
    method add (line 188) | @Override
    method getBatchOutputMillis (line 193) | @Override
    method getChainOperator (line 198) | @Override
    method getEmitterIDs (line 204) | @Override
    method getFullHashList (line 209) | @Override
    method getHashExpressions (line 214) | @Override
    method getHashIndexes (line 219) | @Override
    method getInfoID (line 224) | @Override
    method getPrintOut (line 229) | @Override
    method setBatchOutputMillis (line 234) | @Override
    method setFullHashList (line 241) | @Override
    method setHashExpressions (line 246) | @Override
    method setOutputPartKey (line 252) | @Override
    method setOutputPartKey (line 257) | @Override
    method setPrintOut (line 262) | @Override
    method setSecondPreAggProj (line 268) | public EWHSampleMatrixComponent setSecondPreAggProj(
    method setSecondPreAggStorage (line 273) | public EWHSampleMatrixComponent setSecondPreAggStorage(
    method setContentSensitiveThetaJoinWrapper (line 278) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/components/EquiDepthHistogramComponent.java
  class EquiDepthHistogramComponent (line 45) | public class EquiDepthHistogramComponent implements Component {
    method EquiDepthHistogramComponent (line 57) | public EquiDepthHistogramComponent(Component r1, Component r2,
    method equals (line 77) | @Override
    method getAncestorDataSources (line 85) | @Override
    method getChild (line 93) | @Override
    method getName (line 98) | @Override
    method getParents (line 103) | @Override
    method hashCode (line 112) | @Override
    method makeBolts (line 120) | @Override
    method add (line 129) | @Override
    method getBatchOutputMillis (line 134) | @Override
    method getChainOperator (line 139) | @Override
    method getEmitterIDs (line 145) | @Override
    method getFullHashList (line 150) | @Override
    method getHashExpressions (line 155) | @Override
    method getHashIndexes (line 160) | @Override
    method getInfoID (line 165) | @Override
    method getPrintOut (line 170) | @Override
    method setBatchOutputMillis (line 175) | @Override
    method setChild (line 180) | @Override
    method setFullHashList (line 187) | @Override
    method setHashExpressions (line 192) | @Override
    method setOutputPartKey (line 198) | @Override
    method setOutputPartKey (line 204) | @Override
    method setPrintOut (line 209) | @Override
    method setSecondPreAggProj (line 215) | public EquiDepthHistogramComponent setSecondPreAggProj(
    method setSecondPreAggStorage (line 220) | public EquiDepthHistogramComponent setSecondPreAggStorage(
    method setContentSensitiveThetaJoinWrapper (line 225) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/components/OkcanSampleMatrixComponent.java
  class OkcanSampleMatrixComponent (line 44) | public class OkcanSampleMatrixComponent implements Component {
    method OkcanSampleMatrixComponent (line 57) | public OkcanSampleMatrixComponent(Component firstParent,
    method equals (line 74) | @Override
    method getAncestorDataSources (line 82) | @Override
    method getChild (line 90) | @Override
    method getName (line 95) | @Override
    method getParents (line 100) | @Override
    method hashCode (line 105) | @Override
    method makeBolts (line 113) | @Override
    method add (line 123) | @Override
    method getBatchOutputMillis (line 128) | @Override
    method getChainOperator (line 133) | @Override
    method getEmitterIDs (line 139) | @Override
    method getFullHashList (line 144) | @Override
    method getHashExpressions (line 149) | @Override
    method getHashIndexes (line 154) | @Override
    method getInfoID (line 159) | @Override
    method getPrintOut (line 164) | @Override
    method setBatchOutputMillis (line 169) | @Override
    method setChild (line 174) | @Override
    method setFullHashList (line 181) | @Override
    method setHashExpressions (line 186) | @Override
    method setOutputPartKey (line 192) | @Override
    method setOutputPartKey (line 197) | @Override
    method setPrintOut (line 202) | @Override
    method setSecondPreAggProj (line 208) | public OkcanSampleMatrixComponent setSecondPreAggProj(
    method setSecondPreAggStorage (line 213) | public OkcanSampleMatrixComponent setSecondPreAggStorage(
    method setContentSensitiveThetaJoinWrapper (line 218) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/BooleanRegions.java
  class BooleanRegions (line 24) | public class BooleanRegions {
    method BooleanRegions (line 28) | public BooleanRegions(boolean satisfied, List<Region> regions) {
    method isSatisfied (line 33) | public boolean isSatisfied() {
    method setSatisfied (line 37) | public void setSatisfied(boolean satisfied) {
    method getRegions (line 41) | public List<Region> getRegions() {
    method setRegions (line 45) | public void setRegions(List<Region> regions) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ExtremePositions.java
  class ExtremePositions (line 22) | public class ExtremePositions {
    method ExtremePositions (line 25) | public ExtremePositions(int mostLeft, int mostRight) {
    method setMostLeft (line 30) | public void setMostLeft(int mostLeft) {
    method setMostRight (line 34) | public void setMostRight(int mostRight) {
    method getMostLeft (line 38) | public int getMostLeft() {
    method getMostRight (line 42) | public int getMostRight() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/FixedSizePriorityQueue.java
  class FixedSizePriorityQueue (line 25) | public class FixedSizePriorityQueue<T> extends PriorityQueue<T> {
    method FixedSizePriorityQueue (line 39) | public FixedSizePriorityQueue(final int maxSize,
    method add (line 64) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/FrequencyPosition.java
  class FrequencyPosition (line 22) | public class FrequencyPosition {
    method FrequencyPosition (line 27) | public FrequencyPosition(int frequency, int position) {
    method getFrequency (line 32) | public int getFrequency() {
    method setFrequency (line 36) | public void setFrequency(int frequency) {
    method getPosition (line 40) | public int getPosition() {
    method setPosition (line 44) | public void setPosition(int position) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/JoinMatrix.java
  class JoinMatrix (line 40) | public abstract class JoinMatrix<JAT extends Comparable<JAT>> implements
    method getComparisonPredicate (line 66) | public ComparisonPredicate getComparisonPredicate() {
    method getWrapper (line 70) | public NumericType getWrapper() {
    method getNonEmptyCoordinatesIterator (line 74) | public Iterator<long[]> getNonEmptyCoordinatesIterator() {
    method setJoinAttributeX (line 82) | public void setJoinAttributeX(JAT key) {
    method setJoinAttributeY (line 86) | public void setJoinAttributeY(JAT key) {
    method getJoinAttributeX (line 90) | public JAT getJoinAttributeX(int position) {
    method getJoinAttributeY (line 94) | public JAT getJoinAttributeY(int position) {
    method precomputeFrequencies (line 98) | public void precomputeFrequencies() {
    method addElement (line 116) | private void addElement(Map<JAT, Integer> freqList,
    method getNumXElements (line 128) | public int getNumXElements(JAT key) {
    method getNumYElements (line 137) | public int getNumYElements(JAT key) {
    method getXFirstKeyPosition (line 146) | public int getXFirstKeyPosition(JAT key) {
    method getYFirstKeyPosition (line 155) | public int getYFirstKeyPosition(JAT key) {
    method getXFreqPos (line 165) | public FrequencyPosition getXFreqPos(JAT key, Region region) {
    method getYFreqPos (line 192) | public FrequencyPosition getYFreqPos(JAT key, Region region) {
    method getRegions (line 218) | public List<Region> getRegions() {
    method setRegions (line 222) | public void setRegions(List<Region> regions) {
    method clearRegions (line 226) | public void clearRegions() {
    method writeMatrixToFile (line 230) | public void writeMatrixToFile() {
    method getUJMPMatrix (line 241) | public Matrix getUJMPMatrix() {
    method getRegionNumOutputs (line 254) | public int getRegionNumOutputs(Region region) {
    method getTotalNumOutputs (line 264) | public int getTotalNumOutputs() {
    method setTotalNumOutput (line 274) | public void setTotalNumOutput(int totalNumOutputs) {
    method getNumCandidatesIterate (line 279) | public int getNumCandidatesIterate(Map conf) {
    method getCapacity (line 311) | @Override
    method getNumElements (line 314) | @Override
    method getXSize (line 322) | @Override
    method getYSize (line 327) | @Override
    method getElement (line 332) | @Override
    method setElement (line 335) | @Override
    method increment (line 338) | @Override
    method increase (line 341) | @Override
    method getDeepCopy (line 347) | public abstract JoinMatrix<JAT> getDeepCopy();
    method setMinPositiveValue (line 349) | public abstract void setMinPositiveValue(int x, int y);
    method getMinPositiveValue (line 351) | public abstract int getMinPositiveValue();
    method isEmpty (line 353) | public abstract boolean isEmpty(int x, int y);
    method visualize (line 355) | public abstract void visualize(VisualizerInterface visualizer);
    method getConfiguration (line 357) | public abstract Map getConfiguration();

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/KeyPriorityProbability.java
  class KeyPriorityProbability (line 25) | public class KeyPriorityProbability {
    method KeyPriorityProbability (line 30) | public KeyPriorityProbability(String key, double priority,
    method getKey (line 37) | public String getKey() {
    method getPriority (line 41) | public double getPriority() {
    method getD2KeyProbability (line 45) | public double getD2KeyProbability() {
    method setD2KeyProbability (line 49) | public void setD2KeyProbability(double d2KeyProbability) {
    method toString (line 53) | @Override
    class KeyPriorityComparator (line 59) | public static class KeyPriorityComparator implements
      method compare (line 63) | @Override
    class D2KeyProbabilityComparator (line 78) | public static class D2KeyProbabilityComparator implements
      method compare (line 82) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/KeyRegion.java
  class KeyRegion (line 26) | public class KeyRegion<JAT extends Comparable<JAT>> implements Serializa...
    method KeyRegion (line 39) | public KeyRegion(JAT kx1, JAT ky1, JAT kx2, JAT ky2) {
    method KeyRegion (line 46) | public KeyRegion(JAT kx1, JAT ky1, JAT kx2, JAT ky2, double x1ProbLower,
    method get_kx1 (line 62) | public JAT get_kx1() {
    method get_ky1 (line 66) | public JAT get_ky1() {
    method get_kx2 (line 70) | public JAT get_kx2() {
    method get_ky2 (line 74) | public JAT get_ky2() {
    method get_kx1ProbLowerPos (line 78) | public double get_kx1ProbLowerPos() {
    method set_kx1ProbLowerPos (line 82) | public void set_kx1ProbLowerPos(double _kx1ProbLowerPos) {
    method get_kx1ProbUpperPos (line 86) | public double get_kx1ProbUpperPos() {
    method set_kx1ProbUpperPos (line 90) | public void set_kx1ProbUpperPos(double _kx1ProbUpperPos) {
    method get_ky1ProbLowerPos (line 94) | public double get_ky1ProbLowerPos() {
    method set_ky1ProbLowerPos (line 98) | public void set_ky1ProbLowerPos(double _ky1ProbLowerPos) {
    method get_ky1ProbUpperPos (line 102) | public double get_ky1ProbUpperPos() {
    method set_ky1ProbUpperPos (line 106) | public void set_ky1ProbUpperPos(double _ky1ProbUpperPos) {
    method get_kx2ProbLowerPos (line 110) | public double get_kx2ProbLowerPos() {
    method set_kx2ProbLowerPos (line 114) | public void set_kx2ProbLowerPos(double _kx2ProbLowerPos) {
    method get_kx2ProbUpperPos (line 118) | public double get_kx2ProbUpperPos() {
    method set_kx2ProbUpperPos (line 122) | public void set_kx2ProbUpperPos(double _kx2ProbUpperPos) {
    method get_ky2ProbLowerPos (line 126) | public double get_ky2ProbLowerPos() {
    method set_ky2ProbLowerPos (line 130) | public void set_ky2ProbLowerPos(double _ky2ProbLowerPos) {
    method get_ky2ProbUpperPos (line 134) | public double get_ky2ProbUpperPos() {
    method set_ky2ProbUpperPos (line 138) | public void set_ky2ProbUpperPos(double _ky2ProbUpperPos) {
    method getRegionIndex (line 142) | public int getRegionIndex() {
    method toString (line 146) | @Override
    method toString (line 166) | public static String toString(List<KeyRegion> keyRegions) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListAdapter.java
  type ListAdapter (line 22) | public interface ListAdapter<T extends Comparable<T>> {
    method add (line 23) | public void add(T t);
    method set (line 25) | public void set(int index, T t);
    method get (line 27) | public T get(int index);
    method remove (line 29) | public void remove(int index);
    method sort (line 31) | public void sort();
    method size (line 33) | public int size();

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListJavaGeneric.java
  class ListJavaGeneric (line 27) | public class ListJavaGeneric<T extends Comparable<T>> implements
    method set (line 33) | @Override
    method add (line 38) | @Override
    method get (line 43) | @Override
    method remove (line 48) | @Override
    method sort (line 53) | @Override
    method size (line 58) | @Override
    method toString (line 63) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListTIntAdapter.java
  class ListTIntAdapter (line 27) | public class ListTIntAdapter<T extends Comparable<T>> implements
    method set (line 33) | @Override
    method add (line 39) | @Override
    method get (line 45) | @Override
    method remove (line 50) | @Override
    method sort (line 56) | @Override
    method size (line 61) | @Override
    method toString (line 66) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListTLongAdapter.java
  class ListTLongAdapter (line 27) | public class ListTLongAdapter<T extends Comparable<T>> implements
    method set (line 33) | @Override
    method add (line 39) | @Override
    method get (line 45) | @Override
    method remove (line 50) | @Override
    method sort (line 56) | @Override
    method size (line 61) | @Override
    method toString (line 66) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/MatrixIntInt.java
  class MatrixIntInt (line 22) | public class MatrixIntInt implements SimpleMatrix {
    method getCapacity (line 27) | @Override
    method getNumElements (line 32) | @Override
    method getXSize (line 37) | @Override
    method getYSize (line 42) | @Override
    method MatrixIntInt (line 47) | public MatrixIntInt(int xSize, int ySize) {
    method getElement (line 53) | @Override
    method setElement (line 58) | @Override
    method increase (line 63) | @Override
    method increment (line 68) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/NumOfBuckets.java
  class NumOfBuckets (line 22) | public class NumOfBuckets {
    method NumOfBuckets (line 25) | public NumOfBuckets(int xNumOfBuckets, int yNumOfBuckets) {
    method getXNumOfBuckets (line 30) | public int getXNumOfBuckets() {
    method getYNumOfBuckets (line 34) | public int getYNumOfBuckets() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/Point.java
  class Point (line 22) | public class Point {
    method Point (line 25) | public Point(int x, int y) {
    method shift (line 30) | public Point shift(int shiftX, int shiftY) {
    method set_x (line 34) | public void set_x(int x) {
    method set_y (line 38) | public void set_y(int y) {
    method get_x (line 42) | public int get_x() {
    method get_y (line 46) | public int get_y() {
    method hashCode (line 50) | @Override
    method equals (line 59) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/Region.java
  class Region (line 31) | public class Region {
    method Region (line 40) | public Region(int x1, int y1, int x2, int y2) {
    method Region (line 47) | public Region(int x1, int y1, int x2, int y2, int frequency) {
    method Region (line 52) | public Region(Region r) {
    method Region (line 56) | public Region(String regionHash) {
    method Region (line 64) | public Region(Point origUpperLeft, Point origLowerRight) {
    method get_x1 (line 69) | public int get_x1() {
    method set_x1 (line 73) | public void set_x1(int x1) {
    method get_y1 (line 77) | public int get_y1() {
    method set_y1 (line 81) | public void set_y1(int y1) {
    method get_x2 (line 85) | public int get_x2() {
    method set_x2 (line 89) | public void set_x2(int x2) {
    method get_y2 (line 93) | public int get_y2() {
    method set_y2 (line 97) | public void set_y2(int y2) {
    method getFrequency (line 101) | public int getFrequency() {
    method setFrequency (line 105) | public void setFrequency(int frequency) {
    method getHashString (line 110) | public String getHashString() {
    method equalPosition (line 114) | public static boolean equalPosition(Region first, Region second) {
    method getCorner (line 123) | public Point getCorner(int cornerNum) {
    method shiftCorner (line 142) | public Region shiftCorner(int cornerNum, Point newCorner) {
    method getHalfPerimeter (line 169) | public int getHalfPerimeter() {
    method getSizeX (line 176) | public int getSizeX() {
    method getSizeY (line 183) | public int getSizeY() {
    method toString (line 187) | @Override
    method toString (line 193) | public static String toString(List<Region> regions,
    method toString (line 216) | public static String toString(List<Region> regions, String prefix) {
    method minimizeToNotEmpty (line 230) | public void minimizeToNotEmpty(WeightPrecomputation wp) {
    method minimizeToNotEmptyCoarsened (line 253) | public void minimizeToNotEmptyCoarsened(WeightPrecomputation wp,
    method translateCoarsenedToOriginalRegion (line 272) | private Region translateCoarsenedToOriginalRegion(Region region,
    method eliminateEmptyTopExpGrowth (line 289) | private void eliminateEmptyTopExpGrowth(WeightPrecomputation wp,
    method eliminateEmptyBottomExpGrowth (line 317) | private void eliminateEmptyBottomExpGrowth(WeightPrecomputation wp,
    method eliminateEmptyLeftExpGrowth (line 345) | private void eliminateEmptyLeftExpGrowth(WeightPrecomputation wp,
    method eliminateEmptyRightExpGrowth (line 373) | private void eliminateEmptyRightExpGrowth(WeightPrecomputation wp,
    method eliminateEmptyTopRange (line 404) | private void eliminateEmptyTopRange(int lowerBound, int upperBound,
    method eliminateEmptyBottomRange (line 423) | private void eliminateEmptyBottomRange(int lowerBound, int upperBound,
    method eliminateEmptyLeftRange (line 442) | private void eliminateEmptyLeftRange(int lowerBound, int upperBound,
    method eliminateEmptyRightRange (line 461) | private void eliminateEmptyRightRange(int lowerBound, int upperBound,
    method main (line 480) | public static void main(String[] args) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/SimpleMatrix.java
  type SimpleMatrix (line 23) | public interface SimpleMatrix {
    method getCapacity (line 26) | public long getCapacity();
    method getNumElements (line 30) | public long getNumElements();
    method getXSize (line 32) | public int getXSize();
    method getYSize (line 34) | public int getYSize();
    method getElement (line 36) | public int getElement(int x, int y);
    method setElement (line 38) | public void setElement(int value, int x, int y);
    method increment (line 40) | public void increment(int x, int y);
    method increase (line 42) | public void increase(int delta, int x, int y);

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/SparseMatrixUJMP.java
  class SparseMatrixUJMP (line 24) | public class SparseMatrixUJMP implements SimpleMatrix {
    method getCapacity (line 30) | @Override
    method getNumElements (line 35) | @Override
    method getXSize (line 40) | @Override
    method getYSize (line 45) | @Override
    method SparseMatrixUJMP (line 60) | public SparseMatrixUJMP(int capacity, int xSize, int ySize) {
    method getElement (line 68) | @Override
    method setElement (line 73) | @Override
    method increase (line 78) | @Override
    method increment (line 85) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/UJMPAdapterByteMatrix.java
  class UJMPAdapterByteMatrix (line 40) | public class UJMPAdapterByteMatrix<JAT extends Comparable<JAT>> extends
    method UJMPAdapterByteMatrix (line 48) | public UJMPAdapterByteMatrix(int xSize, int ySize, Map map,
    method UJMPAdapterByteMatrix (line 55) | public UJMPAdapterByteMatrix(int xSize, int ySize, Map map) {
    method UJMPAdapterByteMatrix (line 63) | public UJMPAdapterByteMatrix(int xSize, int ySize) {
    method UJMPAdapterByteMatrix (line 84) | public UJMPAdapterByteMatrix(String matrixPath, String matrixName) {
    method UJMPAdapterByteMatrix (line 101) | private UJMPAdapterByteMatrix() {
    method getDeepCopy (line 104) | @Override
    method getConfiguration (line 130) | @Override
    method getCapacity (line 135) | @Override
    method visualize (line 140) | @Override
    method setElement (line 145) | @Override
    method increment (line 155) | @Override
    method increase (line 160) | @Override
    method setMinPositiveValue (line 167) | @Override
    method getMinPositiveValue (line 172) | @Override
    method getElement (line 177) | @Override
    method isEmpty (line 182) | @Override
    method main (line 187) | public static void main(String[] args) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/UJMPAdapterIntMatrix.java
  class UJMPAdapterIntMatrix (line 40) | public class UJMPAdapterIntMatrix<JAT extends Comparable<JAT>> extends
    method UJMPAdapterIntMatrix (line 48) | public UJMPAdapterIntMatrix(int xSize, int ySize, Map map,
    method UJMPAdapterIntMatrix (line 55) | public UJMPAdapterIntMatrix(int xSize, int ySize, Map map) {
    method UJMPAdapterIntMatrix (line 64) | public UJMPAdapterIntMatrix(int numNonZeros, int xSize, int ySize) {
    method UJMPAdapterIntMatrix (line 70) | public UJMPAdapterIntMatrix(int xSize, int ySize) {
    method UJMPAdapterIntMatrix (line 91) | public UJMPAdapterIntMatrix(String matrixPath, String matrixName) {
    method UJMPAdapterIntMatrix (line 108) | private UJMPAdapterIntMatrix() {
    method getDeepCopy (line 111) | @Override
    method getConfiguration (line 137) | @Override
    method getCapacity (line 142) | @Override
    method visualize (line 147) | @Override
    method setElement (line 152) | @Override
    method increment (line 162) | @Override
    method increase (line 167) | @Override
    method setMinPositiveValue (line 174) | @Override
    method getMinPositiveValue (line 179) | @Override
    method getElement (line 184) | @Override
    method isEmpty (line 189) | @Override
    method main (line 194) | public static void main(String[] args) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/EWHSampleMatrixPlan.java
  class EWHSampleMatrixPlan (line 42) | public class EWHSampleMatrixPlan extends QueryPlan {
    method EWHSampleMatrixPlan (line 46) | public EWHSampleMatrixPlan(String dataPath, String extension, Map conf) {
    method getQueryPlan (line 140) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/OkcanSampleMatrixPlan.java
  class OkcanSampleMatrixPlan (line 38) | public class OkcanSampleMatrixPlan extends QueryPlan {
    method OkcanSampleMatrixPlan (line 41) | public OkcanSampleMatrixPlan(String dataPath, String extension, Map co...
    method getQueryPlan (line 115) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandJPS.java
  class ThetaEWHBandJPS (line 49) | public class ThetaEWHBandJPS extends QueryPlan {
    method ThetaEWHBandJPS (line 57) | public ThetaEWHBandJPS(String dataPath, String extension, Map conf) {
    method getQueryPlan (line 179) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandLineitemSelfOrderkeyJoin.java
  class ThetaEWHBandLineitemSelfOrderkeyJoin (line 47) | public class ThetaEWHBandLineitemSelfOrderkeyJoin extends QueryPlan {
    method ThetaEWHBandLineitemSelfOrderkeyJoin (line 52) | public ThetaEWHBandLineitemSelfOrderkeyJoin(String dataPath,
    method getQueryPlan (line 207) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandOrdersCustkeyCustkeyJoin.java
  class ThetaEWHBandOrdersCustkeyCustkeyJoin (line 48) | public class ThetaEWHBandOrdersCustkeyCustkeyJoin extends QueryPlan {
    method ThetaEWHBandOrdersCustkeyCustkeyJoin (line 54) | public ThetaEWHBandOrdersCustkeyCustkeyJoin(String dataPath,
    method getQueryPlan (line 177) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandOrdersOrderkeyCustkeyJoin.java
  class ThetaEWHBandOrdersOrderkeyCustkeyJoin (line 51) | public class ThetaEWHBandOrdersOrderkeyCustkeyJoin extends QueryPlan {
    method ThetaEWHBandOrdersOrderkeyCustkeyJoin (line 60) | public ThetaEWHBandOrdersOrderkeyCustkeyJoin(String dataPath,
    method getQueryPlan (line 226) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandPeer.java
  class ThetaEWHBandPeer (line 47) | public class ThetaEWHBandPeer extends QueryPlan {
    method ThetaEWHBandPeer (line 53) | public ThetaEWHBandPeer(String dataPath, String extension, Map conf) {
    method getQueryPlan (line 176) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHCustomerJoin.java
  class ThetaEWHCustomerJoin (line 48) | public class ThetaEWHCustomerJoin extends QueryPlan {
    method ThetaEWHCustomerJoin (line 55) | public ThetaEWHCustomerJoin(String dataPath, String extension, Map con...
    method getQueryPlan (line 188) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHEquiLineitemOrders.java
  class ThetaEWHEquiLineitemOrders (line 44) | public class ThetaEWHEquiLineitemOrders extends QueryPlan {
    method ThetaEWHEquiLineitemOrders (line 49) | public ThetaEWHEquiLineitemOrders(String dataPath, String extension,
    method getQueryPlan (line 158) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHEquiOrdersCustkeyCustkeyJoin.java
  class ThetaEWHEquiOrdersCustkeyCustkeyJoin (line 49) | public class ThetaEWHEquiOrdersCustkeyCustkeyJoin extends QueryPlan {
    method ThetaEWHEquiOrdersCustkeyCustkeyJoin (line 55) | public ThetaEWHEquiOrdersCustkeyCustkeyJoin(String dataPath,
    method getQueryPlan (line 288) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHLineitemSelfOutputDominatedJoin.java
  class ThetaEWHLineitemSelfOutputDominatedJoin (line 48) | public class ThetaEWHLineitemSelfOutputDominatedJoin extends QueryPlan {
    method ThetaEWHLineitemSelfOutputDominatedJoin (line 56) | public ThetaEWHLineitemSelfOutputDominatedJoin(String dataPath,
    method getQueryPlan (line 193) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHOrdersScaleJoin.java
  class ThetaEWHOrdersScaleJoin (line 53) | public class ThetaEWHOrdersScaleJoin extends QueryPlan {
    method ThetaEWHOrdersScaleJoin (line 64) | public ThetaEWHOrdersScaleJoin(String dataPath, String extension, Map ...
    method getQueryPlan (line 210) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHPartSuppJoin.java
  class ThetaEWHPartSuppJoin (line 46) | public class ThetaEWHPartSuppJoin extends QueryPlan {
    method ThetaEWHPartSuppJoin (line 53) | public ThetaEWHPartSuppJoin(String dataPath, String extension, Map con...
    method getQueryPlan (line 158) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/main/PullStatisticCollector.java
  class PullStatisticCollector (line 50) | public class PullStatisticCollector {
    method open (line 53) | private static CustomReader open(String inputPath) {
    method readLine (line 66) | private static String readLine(CustomReader reader) {
    method readTuples (line 77) | private static List<List<String>> readTuples(CustomReader reader,
    method readTuplesJoinKey (line 89) | private static <T extends Comparable<T>> List<T> readTuplesJoinKey(
    method readAllTupleJoinKeys (line 99) | private static <T extends Comparable<T>> List<T> readAllTupleJoinKeys(
    method close (line 114) | private static void close(CustomReader reader) {
    method fillMatrix (line 123) | private static <T extends Comparable<T>> void fillMatrix(
    method printWallClockTime (line 137) | private static void printWallClockTime() {
    method processConfig (line 143) | private void processConfig(Map map) {
    method PullStatisticCollector (line 176) | public PullStatisticCollector(String args[]) {
    method main (line 196) | public static void main(String[] args) {
    method chooseQueryPlan (line 201) | private PLCQueryPlan chooseQueryPlan(Map map) {
    type PLCQueryPlan (line 213) | private static interface PLCQueryPlan {
      method generateMatrix (line 214) | public JoinMatrix generateMatrix();
    class Hyracks (line 217) | private static class Hyracks implements PLCQueryPlan {
      method Hyracks (line 223) | public Hyracks(Map map) {
      method generateMatrix (line 229) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/main/PushStatisticCollector.java
  class PushStatisticCollector (line 62) | public class PushStatisticCollector {
    method PushStatisticCollector (line 73) | public PushStatisticCollector(Map map) {
    method processTuple (line 80) | public void processTuple(List<String> tuple, int relationNumber) {
    method finalizeProcessing (line 84) | public void finalizeProcessing() {
    method generateKeyRegions (line 209) | public static <JAT extends Comparable<JAT>> List<KeyRegion> generateKe...
    method computeLowerProb (line 299) | private static <JAT extends Comparable<JAT>> double computeLowerProb(
    method computeUpperProb (line 324) | private static <JAT extends Comparable<JAT>> double computeUpperProb(
    method appendKeys (line 350) | private static <T> void appendKeys(List<T> keys, ProjectOperator project,
    method fillMatrix (line 357) | private static <T extends Comparable<T>> void fillMatrix(
    method fillOutput (line 380) | private static <T extends Comparable<T>> void fillOutput(
    method getWallClockTime (line 435) | public static String getWallClockTime() {
    method createFileLogger (line 441) | private void createFileLogger() {
    method specifyAlgorithms (line 459) | private void specifyAlgorithms() {
    method chooseQueryPlan (line 500) | private void chooseQueryPlan() {
    type PLCQueryPlan (line 531) | private static interface PLCQueryPlan {
      method processTuple (line 532) | public void processTuple(List<String> tuple, int relationNumber);
      method generateMatrix (line 534) | public JoinMatrix generateMatrix();
      method getWrapper (line 536) | public NumericType getWrapper();
    class Hyracks (line 539) | private static class Hyracks implements PLCQueryPlan {
      method Hyracks (line 551) | public Hyracks(Map map) {
      method processTuple (line 555) | @Override
      method generateMatrix (line 569) | @Override
      method getWrapper (line 584) | @Override
    class ThetaLineitemSelfJoin (line 590) | private static class ThetaLineitemSelfJoin implements PLCQueryPlan {
      method ThetaLineitemSelfJoin (line 602) | public ThetaLineitemSelfJoin(Map map) {
      method processTuple (line 606) | @Override
      method generateMatrix (line 620) | @Override
      method getWrapper (line 636) | @Override
    class ThetaLineitemSelfJoinInputDominated (line 642) | private static class ThetaLineitemSelfJoinInputDominated implements
      method ThetaLineitemSelfJoinInputDominated (line 655) | public ThetaLineitemSelfJoinInputDominated(Map map) {
      method processTuple (line 659) | @Override
      method generateMatrix (line 673) | @Override
      method getWrapper (line 688) | @Override
    class ThetaTPCH5_R_N_S_L (line 694) | private static class ThetaTPCH5_R_N_S_L implements PLCQueryPlan {
      method ThetaTPCH5_R_N_S_L (line 706) | public ThetaTPCH5_R_N_S_L(Map map) {
      method processTuple (line 710) | @Override
      method generateMatrix (line 724) | @Override
      method getWrapper (line 739) | @Override
    class ThetaTPCH7_L_S_N1 (line 745) | private static class ThetaTPCH7_L_S_N1 implements PLCQueryPlan {
      method ThetaTPCH7_L_S_N1 (line 757) | public ThetaTPCH7_L_S_N1(Map map) {
      method processTuple (line 761) | @Override
      method generateMatrix (line 775) | @Override
      method getWrapper (line 790) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/operators/SampleAsideAndForwardOperator.java
  class SampleAsideAndForwardOperator (line 39) | public class SampleAsideAndForwardOperator extends OneToOneOperator impl...
    method SampleAsideAndForwardOperator (line 59) | public SampleAsideAndForwardOperator(int relationSize, int numOfBuckets,
    method setCollector (line 75) | public void setCollector(OutputCollector collector) {
    method setCollector (line 79) | public void setCollector(SpoutOutputCollector collector) {
    method setComponentIndex (line 83) | public void setComponentIndex(String hostComponentIndex) {
    method isAttachedToSpout (line 87) | private boolean isAttachedToSpout() {
    method accept (line 91) | @Override
    method getContent (line 96) | @Override
    method getNumTuplesProcessed (line 102) | @Override
    method getSampleRate (line 107) | public double getSampleRate() {
    method isBlocking (line 111) | @Override
    method printContent (line 116) | @Override
    method processOne (line 122) | @Override
    method toString (line 141) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/D2CombinerBolt.java
  class D2CombinerBolt (line 50) | public class D2CombinerBolt<JAT extends Number & Comparable<JAT>> extends
    type STATE (line 84) | private enum STATE {
    method D2CombinerBolt (line 90) | public D2CombinerBolt(StormEmitter d2Source,
    method processNonLastTuple (line 144) | private void processNonLastTuple(String inputComponentIndex,
    method addMultiplicity (line 188) | private void addMultiplicity(Map<JAT, Integer> stats, JAT key, int mul...
    method addMultiplicityJoin (line 197) | private void addMultiplicityJoin(Map<JAT, Integer> stats, JAT key, int...
    method getOppositeKey (line 204) | private JAT getOppositeKey(JAT s1Key) {
    method finalizeProcessing (line 258) | private void finalizeProcessing() {
    method prepare (line 301) | @Override
    method declareOutputFields (line 308) | @Override
    method execute (line 349) | @Override
    method tupleSend (line 366) | private void tupleSend(List<String> tuple, List<Integer> hashIndexes) {
    method tupleSend (line 372) | private void tupleSend(String streamId, List<String> tuple,
    method processFinalAck (line 379) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method getComponentConfiguration (line 420) | @Override
    method getEmitterIDs (line 425) | @Override
    method getName (line 430) | @Override
    method getInfoID (line 435) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/DummyBolt.java
  class DummyBolt (line 44) | public class DummyBolt<JAT extends Number & Comparable<JAT>> extends
    method DummyBolt (line 60) | public DummyBolt(StormEmitter lastJoiner, ComponentProperties cp,
    method processNonLastTuple (line 85) | private void processNonLastTuple(String inputComponentIndex,
    method finalizeProcessing (line 90) | private void finalizeProcessing() {
    method prepare (line 95) | @Override
    method declareOutputFields (line 102) | @Override
    method execute (line 114) | @Override
    method processFinalAck (line 130) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method getComponentConfiguration (line 144) | @Override
    method getEmitterIDs (line 149) | @Override
    method getName (line 154) | @Override
    method getInfoID (line 159) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/EWHSampleMatrixBolt.java
  class EWHSampleMatrixBolt (line 64) | public class EWHSampleMatrixBolt<JAT extends Number & Comparable<JAT>> e...
    type STATE (line 118) | private enum STATE {
    method EWHSampleMatrixBolt (line 124) | public EWHSampleMatrixBolt(StormEmitter firstEmitter,
    method execute (line 178) | @Override
    method getComponentConfiguration (line 194) | @Override
    method processNonLastTuple (line 199) | private void processNonLastTuple(String inputComponentIndex,
    method declareOutputFields (line 228) | @Override
    method prepare (line 250) | @Override
    method tupleSend (line 263) | private void tupleSend(String streamId, List<String> tuple,
    method processFinalAck (line 271) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method finalizeProcessing (line 325) | private void finalizeProcessing() {
    method createJoinMatrix (line 357) | private void createJoinMatrix() {
    method computeNumCandidates (line 407) | private void computeNumCandidates() {
    method sendNumCandidates (line 428) | private void sendNumCandidates() {
    method createBoundaries (line 440) | private List<JAT> createBoundaries(List<JAT> joinKeys, int numOfBuckets,
    method createKeyRegions (line 497) | private void createKeyRegions() {
    method fillOutput (line 597) | private void fillOutput(JoinMatrix<JAT> joinMatrix) {
    method precomputeFirstPosFreq (line 649) | private void precomputeFirstPosFreq(List<JAT> bucketBoundaries,
    method findBucket (line 662) | private int findBucket(List<JAT> boundaries,
    method randomChoose (line 672) | private int randomChoose(FirstPosFreq firstPosFreq) {
    method findBucketNoBoundary (line 678) | private int findBucketNoBoundary(List<JAT> boundaries, JAT key) {
    method precomputeProbForBoundaryKeys (line 733) | private static <JAT> void precomputeProbForBoundaryKeys(List<JAT> join...
    method assignProbabilities (line 773) | private static <JAT> void assignProbabilities(JAT desiredKey,
    method getOverlaps (line 845) | private static int getOverlaps(int begin1, int end1, int begin2, int e...
    method findBucket (line 851) | private int findBucket(JAT key, List<JAT> boundaries,
    method randomChoose (line 862) | private static int randomChoose(ArrayList<BeginProbBucket> keyProbs,
    method scaleOutput (line 898) | private void scaleOutput(JoinMatrix<JAT> joinMatrix) {
    class TwoInteger (line 941) | private class TwoInteger {
      method TwoInteger (line 944) | public TwoInteger(int x, int y) {
      method getX (line 949) | public int getX() {
      method getY (line 953) | public int getY() {
    class TwoString (line 958) | private class TwoString {
      method TwoString (line 961) | public TwoString(String x, String y) {
      method TwoString (line 966) | public TwoString(List<String> tuple) {
      method getX (line 971) | public String getX() {
      method getY (line 975) | public String getY() {
    class FirstPosFreq (line 980) | private class FirstPosFreq {
      method FirstPosFreq (line 983) | public FirstPosFreq(int firstPos, int freq) {
      method incrementFreq (line 988) | public void incrementFreq() {
      method getFirstPos (line 992) | public int getFirstPos() {
      method getFreq (line 996) | public int getFreq() {
    class BeginProbBucket (line 1002) | private static class BeginProbBucket {
      method BeginProbBucket (line 1006) | public BeginProbBucket(double beginProbability, int bucketPosition) {
      method getBeginProbability (line 1011) | public double getBeginProbability() {
      method getBucketPosition (line 1015) | public int getBucketPosition() {
      method toString (line 1019) | @Override
    method main (line 1027) | public static void main(String[] args) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/EquiDepthHistogramBolt.java
  class EquiDepthHistogramBolt (line 49) | public class EquiDepthHistogramBolt<JAT extends Number & Comparable<JAT>>
    method EquiDepthHistogramBolt (line 72) | public EquiDepthHistogramBolt(StormEmitter r1Source, StormEmitter r2So...
    method execute (line 119) | @Override
    method getComponentConfiguration (line 135) | @Override
    method processNonLastTuple (line 140) | private void processNonLastTuple(String inputComponentIndex,
    method declareOutputFields (line 154) | @Override
    method prepare (line 166) | @Override
    method processFinalAck (line 182) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method finalizeProcessing (line 196) | private void finalizeProcessing() {
    method createHistogram (line 205) | private void createHistogram(List<JAT> joinKeys, String filePrefix) {
    method createBoundaries (line 236) | private List<JAT> createBoundaries(List<JAT> joinKeys, int numOfBucket...

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/OkcanSampleMatrixBolt.java
  class OkcanSampleMatrixBolt (line 57) | public class OkcanSampleMatrixBolt<JAT extends Number & Comparable<JAT>>
    method OkcanSampleMatrixBolt (line 83) | public OkcanSampleMatrixBolt(StormEmitter firstEmitter,
    method execute (line 124) | @Override
    method getComponentConfiguration (line 140) | @Override
    method processNonLastTuple (line 145) | private void processNonLastTuple(String inputComponentIndex,
    method declareOutputFields (line 162) | @Override
    method prepare (line 174) | @Override
    method processFinalAck (line 182) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method finalizeProcessing (line 196) | private void finalizeProcessing() {
    method createBoundaries (line 305) | private ListAdapter<JAT> createBoundaries(ListAdapter<JAT> joinKeys,

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/S1ReservoirGenerator.java
  class S1ReservoirGenerator (line 55) | public class S1ReservoirGenerator<JAT extends Number & Comparable<JAT>> ...
    method S1ReservoirGenerator (line 140) | public S1ReservoirGenerator(
    method constructReservoir (line 232) | private void constructReservoir(int outputSampleSize) {
    method processNonLastTuple (line 238) | private void processNonLastTuple(String inputComponentIndex,
    method addMultiplicity (line 283) | private <T> void addMultiplicity(Map<T, Integer> stats, T key, int mul...
    method addMultiplicityJoin (line 290) | private void addMultiplicityJoin(Map<JAT, Integer> stats, JAT key, int...
    method maxMultiplicity (line 301) | private void maxMultiplicity(Map<JAT, Integer> stats, JAT key, int mul...
    method finalizeProcessing (line 311) | private void finalizeProcessing() {
    method getMultiplicity (line 390) | private int getMultiplicity(TreeMap<JAT, Integer> d2, JAT r1Key) {
    method createD2OutOfD2Equi (line 406) | private void createD2OutOfD2Equi() {
    method getR2RelationSize (line 466) | private int getR2RelationSize() {
    method prepare (line 475) | @Override
    method declareOutputFields (line 485) | @Override
    method execute (line 516) | @Override
    method tupleSend (line 532) | private void tupleSend(List<String> tuple, List<Integer> hashIndexes) {
    method tupleSend (line 538) | private void tupleSend(String streamId, List<String> tuple,
    method processFinalAck (line 545) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method getComponentConfiguration (line 568) | @Override
    method getEmitterIDs (line 573) | @Override
    method getName (line 578) | @Override
    method getInfoID (line 583) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/S1ReservoirMerge.java
  class S1ReservoirMerge (line 51) | public class S1ReservoirMerge<JAT extends Number & Comparable<JAT>> extends
    method S1ReservoirMerge (line 74) | public S1ReservoirMerge(StormEmitter s1ReservoirGenerator,
    method constructReservoir (line 123) | private void constructReservoir() {
    method processNonLastTuple (line 131) | private void processNonLastTuple(String inputComponentIndex,
    method finalizeProcessing (line 163) | private void finalizeProcessing() {
    method binarySearch (line 243) | private int binarySearch(List<KeyPriorityProbability> keyProbabilities,
    method sendKey (line 280) | private void sendKey(String key) {
    method prepare (line 291) | @Override
    method declareOutputFields (line 298) | @Override
    method execute (line 315) | @Override
    method tupleSend (line 331) | private void tupleSend(List<String> tuple, List<Integer> hashIndexes) {
    method tupleSend (line 337) | private void tupleSend(String streamId, List<String> tuple,
    method processFinalAck (line 344) | protected boolean processFinalAck(List<String> tuple, Tuple stormTuple...
    method getComponentConfiguration (line 363) | @Override
    method getEmitterIDs (line 368) | @Override
    method getName (line 373) | @Override
    method getInfoID (line 378) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/stream_grouping/RangeFilteredMulticastStreamGrouping.java
  class RangeFilteredMulticastStreamGrouping (line 40) | public class RangeFilteredMulticastStreamGrouping extends
    method RangeFilteredMulticastStreamGrouping (line 56) | public RangeFilteredMulticastStreamGrouping(Map map,
    method prepare (line 68) | @Override
    method chooseTasks (line 84) | @Override
    method isWithinBoundaries (line 103) | private boolean isWithinBoundaries(int taskIndex, String strKey,

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/stream_grouping/RangeMulticastStreamGrouping.java
  class RangeMulticastStreamGrouping (line 46) | public class RangeMulticastStreamGrouping implements CustomStreamGrouping,
    method RangeMulticastStreamGrouping (line 65) | public RangeMulticastStreamGrouping(Map map, NumericType wrapper,
    method RangeMulticastStreamGrouping (line 82) | public RangeMulticastStreamGrouping(Map map,
    method isMulticast (line 89) | private boolean isMulticast() {
    method chooseTasks (line 93) | @Override
    method chooseTargetIndex (line 110) | private List<Integer> chooseTargetIndex(String tupleHash) {
    method chooseTargetIndexNonMulticast (line 128) | private int chooseTargetIndexNonMulticast(Object hash) {
    method chooseTaskIndex (line 133) | protected int chooseTaskIndex(Object key, List rangeBoundaries) {
    method chooseTargetIndexMulticast (line 172) | private List<Integer> chooseTargetIndexMulticast(Object hash) {
    method prepare (line 202) | @Override
    method createBoundariesStatic (line 232) | private void createBoundariesStatic() {
    method createBoundariesFromHistogram (line 251) | protected List createBoundariesFromHistogram(String filePrefix,
    method checkBoundaries (line 270) | private void checkBoundaries() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/utilities/OverweightedException.java
  class OverweightedException (line 22) | public class OverweightedException extends Exception {
    method OverweightedException (line 27) | public OverweightedException(double maxWeight, int x1, int y1, int x2,
    method toString (line 36) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/utilities/TooSmallMaxWeightException.java
  class TooSmallMaxWeightException (line 24) | public class TooSmallMaxWeightException extends Exception {
    method TooSmallMaxWeightException (line 29) | public TooSmallMaxWeightException(double maxWeight,
    method toString (line 35) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/utilities/TroveIntArrayTest.java
  class TroveIntArrayTest (line 29) | public class TroveIntArrayTest {
    method main (line 33) | public static void main(String[] args) {
    method testTroveArray (line 47) | private static void testTroveArray() {
    method testJavaArray (line 62) | private static void testJavaArray() {

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/visualize/UJMPVisualizer.java
  class UJMPVisualizer (line 30) | public class UJMPVisualizer implements VisualizerInterface {
    method UJMPVisualizer (line 39) | public UJMPVisualizer(String label) {
    method visualize (line 43) | @Override
    method visualize (line 67) | @Override
    method createRegions (line 78) | private void createRegions(List<Region> regions) {
    method drawRegion (line 89) | private void drawRegion(int regionNum, int numOfRegions, Region region) {
    method drawLine (line 101) | private void drawLine(Matrix m, int x1, int y1, int x2, int y2, int xS...

FILE: squall-core/src/main/java/ch/epfl/data/squall/ewh/visualize/VisualizerInterface.java
  type VisualizerInterface (line 28) | public interface VisualizerInterface {
    method visualize (line 30) | public void visualize(UJMPAdapterByteMatrix m);
    method visualize (line 32) | public void visualize(UJMPAdapterIntMatrix m);

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/Addition.java
  class Addition (line 43) | public class Addition<T extends Number & Comparable<T>> implements
    method Addition (line 51) | public Addition(ValueExpression ve1, ValueExpression ve2,
    method accept (line 59) | @Override
    method changeValues (line 64) | @Override
    method eval (line 70) | @Override
    method evalString (line 81) | @Override
    method getInnerExpressions (line 87) | @Override
    method getType (line 92) | @Override
    method inverseNumber (line 97) | @Override
    method isNegative (line 102) | @Override
    method toString (line 107) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/ColumnReference.java
  class ColumnReference (line 28) | public class ColumnReference<T extends Comparable<T>> implements
    method ColumnReference (line 36) | public ColumnReference(Type<T> wrapper, int columnIndex) {
    method ColumnReference (line 44) | public ColumnReference(Type<T> wrapper, int columnIndex, String column...
    method accept (line 49) | @Override
    method changeValues (line 54) | @Override
    method eval (line 59) | @Override
    method evalString (line 65) | @Override
    method getColumnIndex (line 70) | public int getColumnIndex() {
    method getInnerExpressions (line 74) | @Override
    method getType (line 79) | @Override
    method inverseNumber (line 84) | @Override
    method isNegative (line 90) | @Override
    method setColumnIndex (line 95) | public void setColumnIndex(int column) {
    method toString (line 99) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/ConcatIntDouble.java
  class ConcatIntDouble (line 30) | public class ConcatIntDouble implements ValueExpression<Long> {
    method ConcatIntDouble (line 43) | public ConcatIntDouble(int intIndex, int dblIndex, int divider) {
    method accept (line 50) | @Override
    method changeValues (line 57) | @Override
    method eval (line 62) | @Override
    method evalString (line 73) | @Override
    method getInnerExpressions (line 79) | @Override
    method getType (line 84) | @Override
    method inverseNumber (line 89) | @Override
    method isNegative (line 95) | @Override
    method toString (line 100) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/ConcatIntString.java
  class ConcatIntString (line 30) | public class ConcatIntString implements ValueExpression<Integer> {
    method ConcatIntString (line 38) | public ConcatIntString(int intIndex, int strIndex) {
    method accept (line 43) | @Override
    method changeValues (line 50) | @Override
    method eval (line 55) | @Override
    method evalString (line 62) | @Override
    method getInnerExpressions (line 68) | @Override
    method getType (line 73) | @Override
    method inverseNumber (line 78) | @Override
    method isNegative (line 84) | @Override
    method toString (line 89) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/DateDiff.java
  class DateDiff (line 31) | public class DateDiff implements ValueExpression<Integer> {
    method DateDiff (line 39) | public DateDiff(ValueExpression<Date> ve1, ValueExpression<Date> ve2) {
    method accept (line 44) | @Override
    method changeValues (line 49) | @Override
    method eval (line 54) | @Override
    method evalString (line 65) | @Override
    method getInnerExpressions (line 70) | @Override
    method getType (line 78) | @Override
    method inverseNumber (line 83) | @Override
    method isNegative (line 88) | @Override
    method toString (line 94) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/DateSum.java
  class DateSum (line 31) | public class DateSum implements ValueExpression<Date> {
    method DateSum (line 39) | public DateSum(ValueExpression<Date> ve, int unit, int interval) {
    method accept (line 45) | @Override
    method changeValues (line 50) | @Override
    method eval (line 55) | @Override
    method evalString (line 64) | @Override
    method getInnerExpressions (line 69) | @Override
    method getType (line 76) | @Override
    method inverseNumber (line 81) | @Override
    method isNegative (line 86) | @Override
    method toString (line 92) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/Division.java
  class Division (line 43) | public class Division implements ValueExpression<Integer> {
    method Division (line 50) | public Division(ValueExpression ve1, ValueExpression ve2,
    method accept (line 57) | @Override
    method changeValues (line 62) | @Override
    method eval (line 67) | @Override
    method evalString (line 83) | @Override
    method getInnerExpressions (line 89) | @Override
    method getType (line 94) | @Override
    method inverseNumber (line 99) | @Override
    method isNegative (line 104) | @Override
    method toString (line 109) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/DoubleToInt.java
  class DoubleToInt (line 29) | public class DoubleToInt implements ValueExpression<Integer> {
    method DoubleToInt (line 36) | public DoubleToInt(int columnIndex) {
    method accept (line 40) | @Override
    method changeValues (line 47) | @Override
    method eval (line 52) | @Override
    method evalString (line 59) | @Override
    method getInnerExpressions (line 65) | @Override
    method getType (line 70) | @Override
    method inverseNumber (line 75) | @Override
    method isNegative (line 81) | @Override
    method toString (line 86) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/IntegerYearFromDate.java
  class IntegerYearFromDate (line 31) | public class IntegerYearFromDate implements ValueExpression<Integer> {
    method IntegerYearFromDate (line 37) | public IntegerYearFromDate(ValueExpression<Date> veDate) {
    method accept (line 41) | @Override
    method changeValues (line 55) | @Override
    method eval (line 61) | @Override
    method evalString (line 78) | @Override
    method getInnerExpressions (line 84) | @Override
    method getType (line 91) | @Override
    method inverseNumber (line 96) | @Override
    method isNegative (line 102) | @Override
    method toString (line 107) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/LongPhone.java
  class LongPhone (line 29) | public class LongPhone implements ValueExpression<Long> {
    method LongPhone (line 37) | public LongPhone(int columnIndex) {
    method LongPhone (line 41) | public LongPhone(int columnIndex, int firstDigits) {
    method accept (line 46) | @Override
    method changeValues (line 53) | @Override
    method eval (line 58) | @Override
    method evalString (line 68) | @Override
    method getInnerExpressions (line 74) | @Override
    method getType (line 79) | @Override
    method inverseNumber (line 84) | @Override
    method isNegative (line 90) | @Override
    method toString (line 95) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/Multiplication.java
  class Multiplication (line 43) | public class Multiplication<T extends Number & Comparable<T>> implements
    method Multiplication (line 51) | public Multiplication(ValueExpression ve1, ValueExpression ve2,
    method accept (line 59) | @Override
    method changeValues (line 64) | @Override
    method eval (line 70) | @Override
    method evalString (line 81) | @Override
    method getInnerExpressions (line 87) | @Override
    method getType (line 92) | @Override
    method inverseNumber (line 97) | @Override
    method isNegative (line 103) | @Override
    method toString (line 108) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/StringConcatenate.java
  class StringConcatenate (line 31) | public class StringConcatenate implements ValueExpression<String> {
    method StringConcatenate (line 36) | public StringConcatenate(ValueExpression<String> str1,
    method accept (line 43) | @Override
    method changeValues (line 48) | @Override
    method eval (line 53) | @Override
    method evalString (line 61) | @Override
    method getInnerExpressions (line 66) | @Override
    method getType (line 71) | @Override
    method inverseNumber (line 76) | @Override
    method isNegative (line 81) | @Override
    method toString (line 86) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/Subtraction.java
  class Subtraction (line 45) | public class Subtraction<T extends Number & Comparable<T>> implements
    method Subtraction (line 52) | public Subtraction(ValueExpression ve1, ValueExpression ve2,
    method accept (line 60) | @Override
    method changeValues (line 65) | @Override
    method eval (line 71) | @Override
    method evalString (line 88) | @Override
    method getInnerExpressions (line 94) | @Override
    method getType (line 99) | @Override
    method inverseNumber (line 104) | @Override
    method isNegative (line 109) | @Override
    method toString (line 114) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/ValueExpression.java
  type ValueExpression (line 28) | public interface ValueExpression<T extends Comparable<T>> extends Serial...
    method accept (line 29) | public void accept(ValueExpressionVisitor vev);
    method changeValues (line 32) | public void changeValues(int i, ValueExpression<T> newExpr);
    method eval (line 34) | public T eval(List<String> tuple);
    method evalString (line 36) | public String evalString(List<String> tuple);
    method getInnerExpressions (line 40) | public List<ValueExpression> getInnerExpressions();
    method getType (line 42) | public Type getType();
    method inverseNumber (line 44) | public void inverseNumber();
    method isNegative (line 46) | public boolean isNegative();

FILE: squall-core/src/main/java/ch/epfl/data/squall/expressions/ValueSpecification.java
  class ValueSpecification (line 34) | public class ValueSpecification<T extends Comparable<T>> implements
    method ValueSpecification (line 41) | public ValueSpecification(Type<T> wrapper, T constant) {
    method accept (line 46) | @Override
    method changeValues (line 51) | @Override
    method eval (line 56) | @Override
    method evalString (line 61) | @Override
    method getInnerExpressions (line 67) | @Override
    method getType (line 72) | @Override
    method inverseNumber (line 77) | @Override
    method isNegative (line 88) | @Override
    method toString (line 98) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/main/Main.java
  class Main (line 44) | public class Main {
    method addVariablesToMap (line 45) | public static void addVariablesToMap(Map map, String confPath) {
    method chooseQueryPlan (line 54) | public static QueryBuilder chooseQueryPlan(Map conf) {
    method main (line 114) | public static void main(String[] args) {
    method printInfoID (line 118) | private static void printInfoID(TopologyKiller killer,
    method putBatchSizes (line 141) | public static void putBatchSizes(QueryBuilder plan, Map map) {
    method Main (line 172) | public Main(QueryBuilder queryPlan, Map map, String confPath) {
    method Main (line 182) | public Main(String[] args) {

FILE: squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateAvgOperator.java
  class AggregateAvgOperator (line 42) | public class AggregateAvgOperator extends OneToOneOperator implements Ag...
    method AggregateAvgOperator (line 67) | public AggregateAvgOperator(ValueExpression ve, Map map) {
    method accept (line 73) | @Override
    method alreadySetOther (line 78) | private boolean alreadySetOther(int GB_COLUMNS) {
    method clearStorage (line 82) | @Override
    method getContent (line 87) | @Override
    method getDistinct (line 93) | @Override
    method getExpressions (line 98) | @Override
    method getGroupByColumns (line 105) | @Override
    method getGroupByProjection (line 110) | @Override
    method getGroupByStr (line 115) | private String getGroupByStr() {
    method getNumTuplesProcessed (line 128) | @Override
    method getStorage (line 133) | @Override
    method getType (line 138) | @Override
    method hasGroupBy (line 143) | @Override
    method isBlocking (line 148) | @Override
    method printContent (line 153) | @Override
    method processOne (line 159) | @Override
    method runAggregateFunction (line 186) | @Override
    method runAggregateFunction (line 210) | @Override
    method setDistinct (line 217) | @Override
    method setGroupByColumns (line 223) | @Override
    method setGroupByColumns (line 230) | @Override
    method setGroupByProjection (line 241) | @Override
    method toString (line 253) | @Override
    method SetWindowSemantics (line 271) | @Override
    method SetWindowSemantics (line 285) | @Override
    method getWindowSemanticsInfo (line 292) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateCountOperator.java
  class AggregateCountOperator (line 41) | public class AggregateCountOperator extends OneToOneOperator implements ...
    method AggregateCountOperator (line 65) | public AggregateCountOperator(Map map) {
    method accept (line 70) | @Override
    method alreadySetOther (line 75) | private boolean alreadySetOther(int GB_COLUMNS) {
    method clearStorage (line 79) | @Override
    method getContent (line 87) | @Override
    method getDistinct (line 93) | @Override
    method getExpressions (line 98) | @Override
    method getGroupByColumns (line 103) | @Override
    method getGroupByProjection (line 108) | @Override
    method getGroupByStr (line 113) | private String getGroupByStr() {
    method getNumTuplesProcessed (line 126) | @Override
    method getStorage (line 131) | @Override
    method getType (line 136) | @Override
    method hasGroupBy (line 141) | @Override
    method isBlocking (line 146) | @Override
    method printContent (line 151) | @Override
    method processOne (line 157) | @Override
    method runAggregateFunction (line 184) | @Override
    method runAggregateFunction (line 189) | @Override
    method setDistinct (line 194) | @Override
    method setGroupByColumns (line 200) | @Override
    method setGroupByColumns (line 207) | @Override
    method setGroupByProjection (line 218) | @Override
    method toString (line 230) | @Override
    method SetWindowSemantics (line 247) | @Override
    method SetWindowSemantics (line 261) | @Override
    method getWindowSemanticsInfo (line 266) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateOperator.java
  type AggregateOperator (line 28) | public interface AggregateOperator<T> extends Operator {
    method clearStorage (line 29) | public void clearStorage();
    method getDistinct (line 31) | public DistinctOperator getDistinct();
    method getExpressions (line 34) | public List<ValueExpression> getExpressions();
    method getGroupByColumns (line 36) | public List<Integer> getGroupByColumns();
    method getGroupByProjection (line 38) | public ProjectOperator getGroupByProjection();
    method getStorage (line 41) | public BasicStore getStorage();
    method SetWindowSemantics (line 43) | public AggregateOperator<T> SetWindowSemantics(int windowRangeInSeconds,
    method SetWindowSemantics (line 46) | public AggregateOperator<T> SetWindowSemantics(int windowRangeInSeconds);
    method getWindowSemanticsInfo (line 48) | public int[] getWindowSemanticsInfo();
    method getType (line 50) | public Type getType();
    method hasGroupBy (line 52) | public boolean hasGroupBy();
    method runAggregateFunction (line 54) | public T runAggregateFunction(T value, List<String> tuple);
    method runAggregateFunction (line 56) | public T runAggregateFunction(T value1, T value2);
    method setDistinct (line 62) | public AggregateOperator setDistinct(DistinctOperator distinct);
    method setGroupByColumns (line 64) | public AggregateOperator setGroupByColumns(int... groupByColumns);
    method setGroupByColumns (line 68) | public AggregateOperator setGroupByColumns(List<Integer> groupByColumns);
    method setGroupByProjection (line 70) | public AggregateOperator setGroupByProjection(ProjectOperator projecti...

FILE: squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateStream.java
  type AggregateStream (line 26) | public interface AggregateStream {
    method updateStream (line 52) | public List<List<String>> updateStream(List<String> tuple, boolean wit...

FILE: squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateSumOperator.java
  class AggregateSumOperator (line 43) | public class AggregateSumOperator<T extends Number & Comparable<T>> exte...
    method AggregateSumOperator (line 68) | public AggregateSumOperator(ValueExpression<T> ve, Map map) {
    method accept (line 75) | @Override
    method alreadySetOther (line 80) | private boolean alreadySetOther(int GB_COLUMNS) {
    method clearStorage (line 84) | @Override
    method getContent (line 92) | @Override
    method getDistinct (line 98) | @Override
    method getExpressions (line 103) | @Override
    method getGroupByColumns (line 110) | @Override
    method getGroupByProjection (line 115) | @Override
    method getGroupByStr (line 120) | private String getGroupByStr() {
    method getNumTuplesProcessed (line 133) | @Override
    method getStorage (line 138) | @Override
    method getType (line 143) | @Override
    method hasGroupBy (line 148) | @Override
    method isBlocking (line 153) | @Override
    method printContent (line 158) | @Override
    method processOne (line 164) | @Override
    method updateStream (line 190) | @Override
    method createUpdateTuple (line 240) | private List<String> createUpdateTuple(String multiplicity, List<Strin...
    method runAggregateFunction (line 252) | @Override
    method runAggregateFunction (line 260) | @Override
    method setDistinct (line 270) | @Override
    method setGroupByColumns (line 276) | @Override
    method setGroupByColumns (line 283) | @Override
    method setGroupByProjection (line 295) | @Override
    method toString (line 307) | @Override
    method SetWindowSemantics (line 325) | @Override
    method SetWindowSemantics (line 338) | @Override
    method getWindowSemanticsInfo (line 343) | @Override

FILE: squall-core/src/main/java/ch/epfl/data/squall/operators/ChainOperator.java
  class ChainOperator (line 28) | public class ChainOperator implements Operator {
    method ChainOperator (line 33) | public ChainOperator() {
    method ChainOperator (line 37) | public ChainOperator(List<Operator> operators) {
    method ChainOperator (line 41) | public ChainOperator(Operator... opArray) {
    method accept (line 47) | @Override
    method addOperator (line 55) | public void addOperator(Operator operator) {
    method finalizeProcessing (line 62) | public void finalizeProcessing() {
    method getAggregation (line 73) | public AggregateOperator getAggregation() {
    method getContent (line 82) | @Override
    method getDistinct (line 94) | public DistinctOperator getDistinct() {
    method getLastOperator (line 101) | public Operator getLastOperator() {
    method getNumTuplesProcessed (line 108) | @Override
    method getOperators (line 119) | public List<Operator> getOperators() {
    method getPrint (line 123) | public PrintOperator getPrint() {
    method getProjection (line 134) | public ProjectOperator getProjection() {
    method getSampleAside (line 141) | public SampleAsideAndForwardOperator getSampleAside() {
    method getSelection (line 152) | public SelectOperator getSelection() {
    method isBlo
Copy disabled (too large) Download .json
Condensed preview — 876 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (29,599K chars).
[
  {
    "path": ".gitignore",
    "chars": 493,
    "preview": "# Extensions\n*.class\n*.swp\n\n# Paths\n.idea\ncbin\ndbtoaster\neclipse\nresources\nexperiments\nstorm-0*\napache-storm-*\ntest/squa"
  },
  {
    "path": ".travis.yml",
    "chars": 92,
    "preview": "language: scala\n\nscala:\n   - 2.11.6\n   \nbefore_script:\n  - sudo chmod +x /usr/local/bin/sbt\n"
  },
  {
    "path": "LICENSE",
    "chars": 11357,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "NOTICE",
    "chars": 392,
    "preview": "EPFLDATA/Squall\r\nCopyright 2011-2015 The Squall Collaboration:\r\n-- the EPFL DATA Laboratory (http://data.epfl.ch) and\r\n-"
  },
  {
    "path": "README.markdown",
    "chars": 8722,
    "preview": "\n<!-- <p> &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp"
  },
  {
    "path": "bin/install.sh",
    "chars": 848,
    "preview": "#!/bin/bash\n\n. ./storm_env.sh\n\n# The following is needed only if we use DBToaster operators\n# On Linux machines, we need"
  },
  {
    "path": "bin/recompile.sh",
    "chars": 200,
    "preview": "#!/bin/bash\n\ncd ../\n\n#sbt clean\n\n# Generate squall-0.2.0.jar\nsbt package\n\n# Generate squall-dependencies-0.2.0.jar\n#sbt "
  },
  {
    "path": "bin/squall_cluster.sh",
    "chars": 976,
    "preview": "#!/bin/bash\n. ./storm_env.sh\n\nprintFormat (){\n\techo \"Format:     ./squall_cluster.sh MODE CONFIG_PATH\"\n\techo \"          "
  },
  {
    "path": "bin/squall_local.sh",
    "chars": 1037,
    "preview": "#!/bin/bash\n. ./storm_env.sh\n\nprintFormat (){\n\techo \"Format:     ./squall_local.sh MODE CONFIG_PATH\"\n\techo \"            "
  },
  {
    "path": "bin/storm_env.sh",
    "chars": 238,
    "preview": "#!/bin/bash\n\n#STORMNAME=storm-0.9.2-incubating\nSTORMNAME=apache-storm-0.9.4\n\n# DBTOASTER installation folder. Only requi"
  },
  {
    "path": "build.sbt",
    "chars": 9508,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "project/build.properties",
    "chars": 19,
    "preview": "sbt.version=0.13.8\n"
  },
  {
    "path": "project/plugins.sbt",
    "chars": 57,
    "preview": "addSbtPlugin(\"com.eed3si9n\" % \"sbt-assembly\" % \"0.13.0\")\n"
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/ConfigSelectivityEstimator.java",
    "chars": 1220,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/HardCodedSelectivities.java",
    "chars": 3013,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/JSQLTypeConverter.java",
    "chars": 6306,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/SelectivityEstimator.java",
    "chars": 917,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/estimators/SelingerSelectivityEstimator.java",
    "chars": 9758,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/main/ParserMain.java",
    "chars": 4975,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/CompGen.java",
    "chars": 1467,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/Optimizer.java",
    "chars": 900,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/CompLevel.java",
    "chars": 1405,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/EarlyProjection.java",
    "chars": 14571,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexCompGen.java",
    "chars": 5274,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexRuleOptimizer.java",
    "chars": 14617,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexSimpleOptimizer.java",
    "chars": 7238,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/IndexTranslator.java",
    "chars": 6601,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/LevelAssigner.java",
    "chars": 2335,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/RuleParallelismAssigner.java",
    "chars": 3383,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/index/TableSelector.java",
    "chars": 3595,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostEstimator.java",
    "chars": 8974,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostParallelismAssigner.java",
    "chars": 14753,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/CostParams.java",
    "chars": 3723,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCompGen.java",
    "chars": 24425,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCompGenFactory.java",
    "chars": 2263,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameCostOptimizer.java",
    "chars": 7433,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameManualOptimizer.java",
    "chars": 2513,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameManualParOptimizer.java",
    "chars": 3739,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameRuleOptimizer.java",
    "chars": 3033,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/NameTranslator.java",
    "chars": 7435,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/ProjGlobalCollect.java",
    "chars": 4303,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/ProjSchemaCreator.java",
    "chars": 11374,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ClusterConstants.java",
    "chars": 3127,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ManualBatchingCompGenFactory.java",
    "chars": 2413,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ManualBatchingOptimizer.java",
    "chars": 6859,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/optimizers/name/manual_batching/ManualBatchingParallelismAssigner.java",
    "chars": 13366,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/ColumnNameType.java",
    "chars": 1913,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/Schema.java",
    "chars": 5965,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/ParseException.java",
    "chars": 6626,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SchemaParser.java",
    "chars": 16558,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SchemaParserConstants.java",
    "chars": 2352,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SchemaParserTokenManager.java",
    "chars": 17498,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/SimpleCharStream.java",
    "chars": 12314,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/Token.java",
    "chars": 5135,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/schema/parser/TokenMgrError.java",
    "chars": 5228,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/HierarchyExtractor.java",
    "chars": 2841,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/ImproperParallelismException.java",
    "chars": 1265,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/JoinTablesExprs.java",
    "chars": 6738,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/NotFromMyBranchException.java",
    "chars": 912,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/ParserUtil.java",
    "chars": 28661,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/TableAliasName.java",
    "chars": 2951,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/util/TupleSchema.java",
    "chars": 2030,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/AndVisitor.java",
    "chars": 8674,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/ColumnCollectVisitor.java",
    "chars": 8639,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/JoinTablesExprsVisitor.java",
    "chars": 11238,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/MaxSubExpressionsVisitor.java",
    "chars": 11253,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/PrintVisitor.java",
    "chars": 9468,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/jsql/SQLVisitor.java",
    "chars": 12123,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/ColumnRefCollectVisitor.java",
    "chars": 2864,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/IndexJoinHashVisitor.java",
    "chars": 14850,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/IndexSelectItemsVisitor.java",
    "chars": 17194,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/IndexWhereVisitor.java",
    "chars": 16062,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameJoinHashVisitor.java",
    "chars": 4594,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameProjectVisitor.java",
    "chars": 15201,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameSelectItemsVisitor.java",
    "chars": 6908,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/NameWhereVisitor.java",
    "chars": 4100,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/VECollectPredVisitor.java",
    "chars": 2317,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/api/sql/visitors/squall/VECollectVisitor.java",
    "chars": 5460,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/AbstractComponent.java",
    "chars": 5973,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/AbstractJoinerComponent.java",
    "chars": 2758,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/Component.java",
    "chars": 2507,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/ComponentProperties.java",
    "chars": 1611,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/DataSourceComponent.java",
    "chars": 4954,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/EquiJoinComponent.java",
    "chars": 5872,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/JoinerComponent.java",
    "chars": 2118,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/OperatorComponent.java",
    "chars": 2721,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/hyper_cube/HyperCubeJoinComponent.java",
    "chars": 4032,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/hyper_cube/HyperCubeJoinComponentFactory.java",
    "chars": 2595,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/theta/AdaptiveThetaJoinComponent.java",
    "chars": 7930,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/theta/ThetaJoinComponent.java",
    "chars": 6138,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/components/theta/ThetaJoinComponentFactory.java",
    "chars": 3827,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/connectors/hdfs/HDFSmaterializer.java",
    "chars": 7423,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/BSPAlgorithm.java",
    "chars": 58907,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/DenseMonotonicWeightPrecomputation.java",
    "chars": 11463,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/DenseWeightPrecomputation.java",
    "chars": 3988,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/InputOutputShallowCoarsener.java",
    "chars": 4663,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/InputShallowCoarsener.java",
    "chars": 6040,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/MCMCRandomWalkAlgorithm.java",
    "chars": 13451,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanAlgorithm.java",
    "chars": 19353,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCandidateCoarsener.java",
    "chars": 9315,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCandidateInputAlgorithm.java",
    "chars": 2769,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCandidateOutputAlgorithm.java",
    "chars": 2309,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanCoarsener.java",
    "chars": 1497,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanExactCoarsener.java",
    "chars": 2983,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanExactInputAlgorithm.java",
    "chars": 2962,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OkcanExactOutputAlgorithm.java",
    "chars": 2285,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/OutputShallowCoarsener.java",
    "chars": 33884,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/PWeightPrecomputation.java",
    "chars": 5045,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/ShallowCoarsener.java",
    "chars": 3995,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/TilingAlgorithm.java",
    "chars": 1554,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/WeightPrecomputation.java",
    "chars": 1530,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/optimality/MaxAvgOptimality.java",
    "chars": 3336,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/optimality/OptimalityMetricInterface.java",
    "chars": 1221,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/algorithms/optimality/WeightFunction.java",
    "chars": 1309,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/components/DummyComponent.java",
    "chars": 5949,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/components/EWHSampleMatrixComponent.java",
    "chars": 9586,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/components/EquiDepthHistogramComponent.java",
    "chars": 6951,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/components/OkcanSampleMatrixComponent.java",
    "chars": 6978,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/BooleanRegions.java",
    "chars": 1330,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ExtremePositions.java",
    "chars": 1250,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/FixedSizePriorityQueue.java",
    "chars": 2871,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/FrequencyPosition.java",
    "chars": 1275,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/JoinMatrix.java",
    "chars": 10665,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/KeyPriorityProbability.java",
    "chars": 2697,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/KeyRegion.java",
    "chars": 5039,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListAdapter.java",
    "chars": 1021,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListJavaGeneric.java",
    "chars": 1654,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListTIntAdapter.java",
    "chars": 1833,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/ListTLongAdapter.java",
    "chars": 1828,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/MatrixIntInt.java",
    "chars": 1736,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/NumOfBuckets.java",
    "chars": 1136,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/Point.java",
    "chars": 1723,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/Region.java",
    "chars": 16646,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/SimpleMatrix.java",
    "chars": 1364,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/SparseMatrixUJMP.java",
    "chars": 2648,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/UJMPAdapterByteMatrix.java",
    "chars": 6464,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/data_structures/UJMPAdapterIntMatrix.java",
    "chars": 6724,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/EWHSampleMatrixPlan.java",
    "chars": 5832,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/OkcanSampleMatrixPlan.java",
    "chars": 4753,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandJPS.java",
    "chars": 7548,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandLineitemSelfOrderkeyJoin.java",
    "chars": 8524,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandOrdersCustkeyCustkeyJoin.java",
    "chars": 7518,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandOrdersOrderkeyCustkeyJoin.java",
    "chars": 9666,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHBandPeer.java",
    "chars": 7373,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHCustomerJoin.java",
    "chars": 8141,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHEquiLineitemOrders.java",
    "chars": 6763,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHEquiOrdersCustkeyCustkeyJoin.java",
    "chars": 12843,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHLineitemSelfOutputDominatedJoin.java",
    "chars": 8068,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHOrdersScaleJoin.java",
    "chars": 9284,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/examples/ThetaEWHPartSuppJoin.java",
    "chars": 6650,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/main/PullStatisticCollector.java",
    "chars": 8668,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/main/PushStatisticCollector.java",
    "chars": 27537,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/operators/SampleAsideAndForwardOperator.java",
    "chars": 4452,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/D2CombinerBolt.java",
    "chars": 15683,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/DummyBolt.java",
    "chars": 5176,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/EWHSampleMatrixBolt.java",
    "chars": 38990,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/EquiDepthHistogramBolt.java",
    "chars": 9347,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/OkcanSampleMatrixBolt.java",
    "chars": 12256,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/S1ReservoirGenerator.java",
    "chars": 22181,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/S1ReservoirMerge.java",
    "chars": 13984,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/stream_grouping/RangeFilteredMulticastStreamGrouping.java",
    "chars": 4394,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/storm_components/stream_grouping/RangeMulticastStreamGrouping.java",
    "chars": 10758,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/utilities/OverweightedException.java",
    "chars": 1398,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/utilities/TooSmallMaxWeightException.java",
    "chars": 1355,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/utilities/TroveIntArrayTest.java",
    "chars": 2440,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/visualize/UJMPVisualizer.java",
    "chars": 4463,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/ewh/visualize/VisualizerInterface.java",
    "chars": 1093,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/Addition.java",
    "chars": 3420,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/ColumnReference.java",
    "chars": 2724,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/ConcatIntDouble.java",
    "chars": 3091,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/ConcatIntString.java",
    "chars": 2701,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/DateDiff.java",
    "chars": 2754,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/DateSum.java",
    "chars": 2619,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/Division.java",
    "chars": 3556,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/DoubleToInt.java",
    "chars": 2391,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/IntegerYearFromDate.java",
    "chars": 3188,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/LongPhone.java",
    "chars": 2630,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/Multiplication.java",
    "chars": 3448,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/StringConcatenate.java",
    "chars": 2632,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/Subtraction.java",
    "chars": 3751,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/ValueExpression.java",
    "chars": 1501,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/expressions/ValueSpecification.java",
    "chars": 2902,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/main/Main.java",
    "chars": 7561,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateAvgOperator.java",
    "chars": 9002,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateCountOperator.java",
    "chars": 8157,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateOperator.java",
    "chars": 2861,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateStream.java",
    "chars": 1763,
    "preview": "/*\n *\n *  * Copyright (c) 2011-2015 EPFL DATA Laboratory\n *  * Copyright (c) 2014-2015 The Squall Collaboration (see NOT"
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/AggregateSumOperator.java",
    "chars": 11323,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/ChainOperator.java",
    "chars": 5807,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/CustomSampleOperatorReachGraph.java",
    "chars": 5557,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/DistinctOperator.java",
    "chars": 3587,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/MultiAggregateOperator.java",
    "chars": 6880,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/OneToOneOperator.java",
    "chars": 1291,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/Operator.java",
    "chars": 2028,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/PrintOperator.java",
    "chars": 3241,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/ProjectOperator.java",
    "chars": 3173,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/RedisOperator.java",
    "chars": 3315,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/SampleOperator.java",
    "chars": 2770,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/SelectOperator.java",
    "chars": 2262,
    "preview": "/*\r\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\r\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\r\n "
  },
  {
    "path": "squall-core/src/main/java/ch/epfl/data/squall/operators/StoreOperator.java",
    "chars": 2692,
    "preview": "/*\n * Copyright (c) 2011-2015 EPFL DATA Laboratory\n * Copyright (c) 2014-2015 The Squall Collaboration (see NOTICE)\n *\n "
  }
]

// ... and 676 more files (download for full content)

About this extraction

This page contains the full source code of the epfldata/squall GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 876 files (27.7 MB), approximately 7.3M tokens, and a symbol index with 4418 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!