quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zu...@apache.org
Subject incubator-quickstep git commit: Minor fix in EliminateEmptyNode.
Date Sat, 05 May 2018 19:29:07 GMT
Repository: incubator-quickstep
Updated Branches:
  refs/heads/master 666102fff -> 3a7b9c796


Minor fix in EliminateEmptyNode.


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

Branch: refs/heads/master
Commit: 3a7b9c796df3f0c2e37b5d69d41aed0162502892
Parents: 666102f
Author: Zuyu Zhang <zuyu@cs.wisc.edu>
Authored: Sat May 5 14:28:59 2018 -0500
Committer: Zuyu Zhang <zuyu@cs.wisc.edu>
Committed: Sat May 5 14:28:59 2018 -0500

----------------------------------------------------------------------
 query_optimizer/rules/EliminateEmptyNode.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/3a7b9c79/query_optimizer/rules/EliminateEmptyNode.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/rules/EliminateEmptyNode.cpp b/query_optimizer/rules/EliminateEmptyNode.cpp
index c025ebf..fd1c383 100644
--- a/query_optimizer/rules/EliminateEmptyNode.cpp
+++ b/query_optimizer/rules/EliminateEmptyNode.cpp
@@ -328,6 +328,15 @@ P::PhysicalPtr EliminateEmptyNode::apply(const P::PhysicalPtr &input)
{
     }
   }
 
+  auto output = Apply(plan);
+  if (output == plan) {
+    return input;
+  }
+
+  if (output) {
+    return input->copyWithNewChildren({output});
+  }
+
 #ifdef QUICKSTEP_DEBUG
   {
     CHECK(!project_expressions.empty());
@@ -341,15 +350,6 @@ P::PhysicalPtr EliminateEmptyNode::apply(const P::PhysicalPtr &input)
{
   }
 #endif
 
-  auto output = Apply(plan);
-  if (output == plan) {
-    return input;
-  }
-
-  if (output) {
-    return input->copyWithNewChildren({output});
-  }
-
   auto catalog_relation = std::make_unique<CatalogRelation>(
       catalog_database_, GetNewRelationName(catalog_database_->size()), -1, true);
 


Mime
View raw message