You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@quickstep.apache.org by zu...@apache.org on 2016/05/27 03:23:23 UTC

[32/50] [abbrv] incubator-quickstep git commit: Fixed a bug in convertSelection.

Fixed a bug in convertSelection.


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

Branch: refs/heads/partition_aware_hashjoin_with_optimizer_support
Commit: d96519892ca22f29b47cdaef58a4d5e67bc17188
Parents: 71d843f
Author: Adalbert Gerald <ad...@gmail.com>
Authored: Mon May 23 15:33:58 2016 -0500
Committer: Adalbert Gerald <ad...@gmail.com>
Committed: Mon May 23 15:33:58 2016 -0500

----------------------------------------------------------------------
 query_optimizer/ExecutionGenerator.cpp | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/d9651989/query_optimizer/ExecutionGenerator.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/ExecutionGenerator.cpp b/query_optimizer/ExecutionGenerator.cpp
index e2bfd46..e05c38a 100644
--- a/query_optimizer/ExecutionGenerator.cpp
+++ b/query_optimizer/ExecutionGenerator.cpp
@@ -573,12 +573,15 @@ void ExecutionGenerator::convertSelection(
   std::vector<attribute_id> projected_attributes;
   convertSimpleProjection(project_expressions_group_index, &projected_attributes);
   bool is_temp_relation_partitioned = false;
-  if (std::find(projected_attributes.begin(),
-                projected_attributes.end(),
-                input_relation_info->relation->getPartitionScheme()
-                     .getPartitionSchemeHeader()
-                     .getPartitionAttributeId()) != projected_attributes.end()) {
-    is_temp_relation_partitioned = true;
+
+  if (input_relation_info->relation->hasPartitionScheme()) {
+    if (std::find(projected_attributes.begin(),
+                  projected_attributes.end(),
+                  input_relation_info->relation->getPartitionScheme()
+                       .getPartitionSchemeHeader()
+                       .getPartitionAttributeId()) != projected_attributes.end()) {
+      is_temp_relation_partitioned = true;
+    }
   }
 
   if (is_temp_relation_partitioned) {