quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject [04/25] incubator-quickstep git commit: Added move semantic in the constructor of window plan.
Date Fri, 29 Jul 2016 23:44:07 GMT
Added move semantic in the constructor of window plan.


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

Branch: refs/heads/dist-exe-test-new
Commit: 06177e8a999d3edf2f905492de9f1b30bf76b356
Parents: 6b3aa03
Author: shixuan-fan <shixuan@apache.org>
Authored: Tue Jun 28 15:42:09 2016 +0000
Committer: Zuyu Zhang <zuyuz@twitter.com>
Committed: Fri Jul 29 16:42:09 2016 -0700

----------------------------------------------------------------------
 query_optimizer/resolver/Resolver.cpp | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/06177e8a/query_optimizer/resolver/Resolver.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/resolver/Resolver.cpp b/query_optimizer/resolver/Resolver.cpp
index 1eb6d86..c07751a 100644
--- a/query_optimizer/resolver/Resolver.cpp
+++ b/query_optimizer/resolver/Resolver.cpp
@@ -228,13 +228,13 @@ struct Resolver::QueryAggregationInfo {
 };
 
 struct Resolver::WindowPlan {
-  WindowPlan(const E::WindowInfo &window_info_in,
-             const L::LogicalPtr &logical_plan_in)
-      : window_info(window_info_in),
-        logical_plan(logical_plan_in) {}
+  WindowPlan(const L::LogicalPtr &logical_plan_in,
+             E::WindowInfo &&window_info_in)  // NOLINT(whitespace/operators)
+      : logical_plan(logical_plan_in),
+        window_info(std::move(window_info_in)) {}
 
-  const E::WindowInfo window_info;
   const L::LogicalPtr logical_plan;
+  const E::WindowInfo window_info;
 };
 
 struct Resolver::WindowAggregationInfo {
@@ -1032,9 +1032,9 @@ L::LogicalPtr Resolver::resolveSelect(
       L::LogicalPtr sorted_logical_plan = resolveSortInWindow(logical_plan,
                                                               resolved_window);
 
-      WindowPlan window_plan(resolved_window, sorted_logical_plan);
+      WindowPlan window_plan(sorted_logical_plan, std::move(resolved_window));
 
-      sorted_window_map.emplace(window.name()->value(), window_plan);
+      sorted_window_map.emplace(window.name()->value(), std::move(window_plan));
     }
   }
 


Mime
View raw message