Repository: incubator-quickstep
Updated Branches:
  refs/heads/lip-refactor-optimizer 4f185888a -> 530cf2761


Style fixes


Project: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-quickstep/commit/530cf276
Tree: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/tree/530cf276
Diff: http://git-wip-us.apache.org/repos/asf/incubator-quickstep/diff/530cf276

Branch: refs/heads/lip-refactor-optimizer
Commit: 530cf276166ccea6f4310bd9daa34e894dd1fcac
Parents: 4f18588
Author: Jianqiao Zhu <jianq...@cs.wisc.edu>
Authored: Wed Oct 12 18:20:12 2016 -0500
Committer: Jianqiao Zhu <jianq...@cs.wisc.edu>
Committed: Wed Oct 12 18:20:12 2016 -0500

----------------------------------------------------------------------
 query_optimizer/PhysicalGenerator.cpp           |  4 ++-
 .../physical/LIPFilterConfiguration.hpp         |  6 ++---
 query_optimizer/rules/AttachLIPFilters.cpp      | 12 +++------
 query_optimizer/rules/AttachLIPFilters.hpp      |  6 +----
 query_optimizer/rules/CMakeLists.txt            |  5 ++--
 .../StarSchemaHashJoinOrderOptimization.hpp     |  3 +--
 third_party/iwyu/iwyu_helper.py                 |  2 +-
 utility/CMakeLists.txt                          |  5 +---
 utility/DisjointTreeForest.hpp                  | 28 ++++++++++----------
 utility/PlanVisualizer.cpp                      |  5 +---
 10 files changed, 30 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/query_optimizer/PhysicalGenerator.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/PhysicalGenerator.cpp 
b/query_optimizer/PhysicalGenerator.cpp
index 8d15895..9db4037 100644
--- a/query_optimizer/PhysicalGenerator.cpp
+++ b/query_optimizer/PhysicalGenerator.cpp
@@ -109,7 +109,9 @@ P::PhysicalPtr PhysicalGenerator::optimizePlan() {
   } else {
     rules.emplace_back(new SwapProbeBuild());
   }
-  rules.emplace_back(new AttachLIPFilters());
+  if (FLAGS_use_lip_filters) {
+    rules.emplace_back(new AttachLIPFilters());
+  }
 
   for (std::unique_ptr<Rule<P::Physical>> &rule : rules) {
     physical_plan_ = rule->apply(physical_plan_);

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/query_optimizer/physical/LIPFilterConfiguration.hpp
----------------------------------------------------------------------
diff --git a/query_optimizer/physical/LIPFilterConfiguration.hpp 
b/query_optimizer/physical/LIPFilterConfiguration.hpp
index 93ce318..62a6149 100644
--- a/query_optimizer/physical/LIPFilterConfiguration.hpp
+++ b/query_optimizer/physical/LIPFilterConfiguration.hpp
@@ -20,16 +20,14 @@
 #ifndef QUICKSTEP_QUERY_OPTIMIZER_PHYSICAL_LIP_FILTER_CONFIGURATION_HPP_
 #define QUICKSTEP_QUERY_OPTIMIZER_PHYSICAL_LIP_FILTER_CONFIGURATION_HPP_
 
+#include <cstddef>
 #include <map>
 #include <memory>
-#include <string>
 #include <vector>
 
 #include "query_optimizer/expressions/AttributeReference.hpp"
-#include "utility/lip_filter/LIPFilter.hpp"
 #include "utility/Macros.hpp"
-
-#include "glog/logging.h"
+#include "utility/lip_filter/LIPFilter.hpp"
 
 namespace quickstep {
 namespace optimizer {

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/query_optimizer/rules/AttachLIPFilters.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/rules/AttachLIPFilters.cpp 
b/query_optimizer/rules/AttachLIPFilters.cpp
index 5793d4c..090fb8c 100644
--- a/query_optimizer/rules/AttachLIPFilters.cpp
+++ b/query_optimizer/rules/AttachLIPFilters.cpp
@@ -19,26 +19,22 @@
 
 #include "query_optimizer/rules/AttachLIPFilters.hpp"
 
-#include <algorithm>
-#include <iterator>
 #include <map>
-#include <memory>
 #include <set>
-#include <stack>
 #include <unordered_set>
 #include <unordered_map>
-#include <utility>
 #include <vector>
+#include <utility>
 
 #include "query_optimizer/cost_model/StarSchemaSimpleCostModel.hpp"
 #include "query_optimizer/expressions/AttributeReference.hpp"
-#include "query_optimizer/expressions/NamedExpression.hpp"
-#include "query_optimizer/expressions/PatternMatcher.hpp"
 #include "query_optimizer/physical/LIPFilterConfiguration.hpp"
+#include "query_optimizer/physical/Aggregate.hpp"
 #include "query_optimizer/physical/HashJoin.hpp"
 #include "query_optimizer/physical/PatternMatcher.hpp"
 #include "query_optimizer/physical/Physical.hpp"
 #include "query_optimizer/physical/PhysicalType.hpp"
+#include "query_optimizer/physical/Selection.hpp"
 #include "query_optimizer/physical/TopLevelPlan.hpp"
 #include "utility/lip_filter/LIPFilter.hpp"
 
@@ -118,7 +114,7 @@ void AttachLIPFilters::attachLIPFilters(
       }
 
       for (const auto &pair : selected_filters) {
-        const E::ExprId source_attr_id =  pair.second->source_attribute->id();
+        const E::ExprId source_attr_id = pair.second->source_attribute->id();
         if (already_filtered_attributes->find(source_attr_id)
                 == already_filtered_attributes->end()) {
           lip_filter_configuration_->addBuildInfo(

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/query_optimizer/rules/AttachLIPFilters.hpp
----------------------------------------------------------------------
diff --git a/query_optimizer/rules/AttachLIPFilters.hpp 
b/query_optimizer/rules/AttachLIPFilters.hpp
index f7d48ad..b8cfc39 100644
--- a/query_optimizer/rules/AttachLIPFilters.hpp
+++ b/query_optimizer/rules/AttachLIPFilters.hpp
@@ -24,18 +24,14 @@
 #include <map>
 #include <memory>
 #include <set>
-#include <stack>
 #include <string>
-#include <utility>
 #include <vector>
 
 #include "query_optimizer/cost_model/StarSchemaSimpleCostModel.hpp"
+#include "query_optimizer/expressions/AttributeReference.hpp"
 #include "query_optimizer/expressions/ExprId.hpp"
-#include "query_optimizer/expressions/NamedExpression.hpp"
-#include "query_optimizer/expressions/Predicate.hpp"
 #include "query_optimizer/physical/LIPFilterConfiguration.hpp"
 #include "query_optimizer/physical/Physical.hpp"
-#include "query_optimizer/physical/HashJoin.hpp"
 #include "query_optimizer/rules/Rule.hpp"
 #include "utility/Macros.hpp"
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/query_optimizer/rules/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/query_optimizer/rules/CMakeLists.txt 
b/query_optimizer/rules/CMakeLists.txt
index bb2dc16..29875f6 100644
--- a/query_optimizer/rules/CMakeLists.txt
+++ b/query_optimizer/rules/CMakeLists.txt
@@ -41,14 +41,13 @@ 
target_link_libraries(quickstep_queryoptimizer_rules_AttachLIPFilters
                       
quickstep_queryoptimizer_costmodel_StarSchemaSimpleCostModel
                       quickstep_queryoptimizer_expressions_AttributeReference
                       quickstep_queryoptimizer_expressions_ExprId
-                      quickstep_queryoptimizer_expressions_NamedExpression
-                      quickstep_queryoptimizer_expressions_PatternMatcher
-                      quickstep_queryoptimizer_expressions_Predicate
+                      quickstep_queryoptimizer_physical_Aggregate
                       quickstep_queryoptimizer_physical_HashJoin
                       quickstep_queryoptimizer_physical_LIPFilterConfiguration
                       quickstep_queryoptimizer_physical_PatternMatcher
                       quickstep_queryoptimizer_physical_Physical
                       quickstep_queryoptimizer_physical_PhysicalType
+                      quickstep_queryoptimizer_physical_Selection
                       quickstep_queryoptimizer_physical_TopLevelPlan
                       quickstep_queryoptimizer_rules_Rule
                       quickstep_utility_Macros

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/query_optimizer/rules/StarSchemaHashJoinOrderOptimization.hpp
----------------------------------------------------------------------
diff --git a/query_optimizer/rules/StarSchemaHashJoinOrderOptimization.hpp 
b/query_optimizer/rules/StarSchemaHashJoinOrderOptimization.hpp
index 347baf1..64e2478 100644
--- a/query_optimizer/rules/StarSchemaHashJoinOrderOptimization.hpp
+++ b/query_optimizer/rules/StarSchemaHashJoinOrderOptimization.hpp
@@ -20,16 +20,15 @@
 #ifndef 
QUICKSTEP_QUERY_OPTIMIZER_RULES_STAR_SCHEMA_HASH_JOIN_ORDER_OPTIMIZATION_HPP_
 #define 
QUICKSTEP_QUERY_OPTIMIZER_RULES_STAR_SCHEMA_HASH_JOIN_ORDER_OPTIMIZATION_HPP_
 
-#include <algorithm>
 #include <cstddef>
 #include <memory>
 #include <string>
-#include <unordered_map>
 #include <unordered_set>
 #include <utility>
 #include <vector>
 
 #include "query_optimizer/cost_model/StarSchemaSimpleCostModel.hpp"
+#include "query_optimizer/expressions/AttributeReference.hpp"
 #include "query_optimizer/expressions/ExprId.hpp"
 #include "query_optimizer/expressions/NamedExpression.hpp"
 #include "query_optimizer/expressions/Predicate.hpp"

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/third_party/iwyu/iwyu_helper.py
----------------------------------------------------------------------
diff --git a/third_party/iwyu/iwyu_helper.py b/third_party/iwyu/iwyu_helper.py
index dff4d55..9c34a46 100755
--- a/third_party/iwyu/iwyu_helper.py
+++ b/third_party/iwyu/iwyu_helper.py
@@ -154,7 +154,7 @@ def GetConfiguration():
 # Run IWYU for the header/source specified in `path' and the specified IWYU
 # configuration.
 def RunIWYU(path, config):
-    args = [IWYU_CMD]
+    args = [IWYU_CMD, '-ferror-limit=0']
     if config.has_key(CFG_MAPPINGS):
         args += list(itertools.chain.from_iterable(
             map(MappingArg, config[CFG_MAPPINGS])))

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/utility/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/utility/CMakeLists.txt b/utility/CMakeLists.txt
index f3f3fa3..395e264 100644
--- a/utility/CMakeLists.txt
+++ b/utility/CMakeLists.txt
@@ -256,16 +256,13 @@ target_link_libraries(quickstep_utility_PrimeNumber
                       glog)
 target_link_libraries(quickstep_utility_PlanVisualizer
                       quickstep_catalog_CatalogRelation
-                      quickstep_catalog_CatalogRelationStatistics
-                      quickstep_catalog_CatalogTypedefs
                       
quickstep_queryoptimizer_costmodel_StarSchemaSimpleCostModel
                       quickstep_queryoptimizer_expressions_AttributeReference
-                      quickstep_queryoptimizer_physical_Aggregate
+                      quickstep_queryoptimizer_expressions_ExprId
                       quickstep_queryoptimizer_physical_HashJoin
                       quickstep_queryoptimizer_physical_LIPFilterConfiguration
                       quickstep_queryoptimizer_physical_Physical
                       quickstep_queryoptimizer_physical_PhysicalType
-                      quickstep_queryoptimizer_physical_Selection
                       quickstep_queryoptimizer_physical_TableReference
                       quickstep_queryoptimizer_physical_TopLevelPlan
                       quickstep_utility_Macros

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/utility/DisjointTreeForest.hpp
----------------------------------------------------------------------
diff --git a/utility/DisjointTreeForest.hpp b/utility/DisjointTreeForest.hpp
index 2ed6363..971ba10 100644
--- a/utility/DisjointTreeForest.hpp
+++ b/utility/DisjointTreeForest.hpp
@@ -1,18 +1,20 @@
 /**
- *   Copyright 2016, Quickstep Research Group, Computer Sciences Department,
- *     University of Wisconsin—Madison.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you 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
  *
- *   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
  *
- *       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.
+ * 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.
  **/
 
 #ifndef QUICKSTEP_UTILITY_DISJOINT_TREE_FOREST_HPP_
@@ -20,8 +22,6 @@
 
 #include <algorithm>
 #include <cstddef>
-#include <limits>
-#include <utility>
 #include <unordered_map>
 #include <vector>
 

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/530cf276/utility/PlanVisualizer.cpp
----------------------------------------------------------------------
diff --git a/utility/PlanVisualizer.cpp b/utility/PlanVisualizer.cpp
index f2dba18..2adf674 100644
--- a/utility/PlanVisualizer.cpp
+++ b/utility/PlanVisualizer.cpp
@@ -28,15 +28,12 @@
 #include <vector>
 
 #include "catalog/CatalogRelation.hpp"
-#include "catalog/CatalogRelationStatistics.hpp"
-#include "catalog/CatalogTypedefs.hpp"
 #include "query_optimizer/cost_model/StarSchemaSimpleCostModel.hpp"
 #include "query_optimizer/expressions/AttributeReference.hpp"
-#include "query_optimizer/physical/Aggregate.hpp"
+#include "query_optimizer/expressions/ExprId.hpp"
 #include "query_optimizer/physical/HashJoin.hpp"
 #include "query_optimizer/physical/Physical.hpp"
 #include "query_optimizer/physical/PhysicalType.hpp"
-#include "query_optimizer/physical/Selection.hpp"
 #include "query_optimizer/physical/TableReference.hpp"
 #include "query_optimizer/physical/TopLevelPlan.hpp"
 #include "utility/StringUtil.hpp"

Reply via email to