quickstep-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianq...@apache.org
Subject incubator-quickstep git commit: Bug fixed in FilterJoin:
Date Fri, 27 Apr 2018 06:26:07 GMT
Repository: incubator-quickstep
Updated Branches:
  refs/heads/master 3c7a89c26 -> c2e269119


Bug fixed  in FilterJoin:

including adding the missing 'has_repartition', and adding FilterJoin
as a subtype of BinaryJoin in PatternMatcher.


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

Branch: refs/heads/master
Commit: c2e269119d6b3f7a73bd39a97c243f62b177ce47
Parents: 3c7a89c
Author: Zuyu Zhang <zuyu@cs.wisc.edu>
Authored: Thu Apr 26 21:20:01 2018 -0500
Committer: Zuyu Zhang <zuyu@cs.wisc.edu>
Committed: Thu Apr 26 23:26:22 2018 -0500

----------------------------------------------------------------------
 query_optimizer/physical/FilterJoin.cpp     | 1 +
 query_optimizer/physical/FilterJoin.hpp     | 8 +++++++-
 query_optimizer/physical/PatternMatcher.hpp | 4 +++-
 query_optimizer/rules/InjectJoinFilters.cpp | 3 +++
 4 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/c2e26911/query_optimizer/physical/FilterJoin.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/physical/FilterJoin.cpp b/query_optimizer/physical/FilterJoin.cpp
index 06f5a16..bac1257 100644
--- a/query_optimizer/physical/FilterJoin.cpp
+++ b/query_optimizer/physical/FilterJoin.cpp
@@ -78,6 +78,7 @@ bool FilterJoin::maybeCopyWithPrunedExpressions(
                      new_project_expressions,
                      build_side_filter_predicate_,
                      is_anti_join_,
+                     has_repartition_,
                      cloneOutputPartitionSchemeHeader());
     return true;
   }

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/c2e26911/query_optimizer/physical/FilterJoin.hpp
----------------------------------------------------------------------
diff --git a/query_optimizer/physical/FilterJoin.hpp b/query_optimizer/physical/FilterJoin.hpp
index 7b55942..369e6bb 100644
--- a/query_optimizer/physical/FilterJoin.hpp
+++ b/query_optimizer/physical/FilterJoin.hpp
@@ -109,6 +109,7 @@ class FilterJoin : public BinaryJoin {
                   project_expressions(),
                   build_side_filter_predicate_,
                   is_anti_join_,
+                  has_repartition_,
                   cloneOutputPartitionSchemeHeader());
   }
 
@@ -128,6 +129,7 @@ class FilterJoin : public BinaryJoin {
    * @param build_side_filter_predicate Optional filtering predicate to be
    *        applied to the build side child BEFORE join.
    * @param is_anti_join Whether this is an anti-join.
+   * @param has_repartition Whether this node does repartition.
    * @param partition_scheme_header The optional output partition scheme header.
    *
    * @return An immutable physical FilterJoin.
@@ -140,6 +142,7 @@ class FilterJoin : public BinaryJoin {
       const std::vector<expressions::NamedExpressionPtr> &project_expressions,
       const expressions::PredicatePtr &build_side_filter_predicate,
       const bool is_anti_join,
+      const bool has_repartition = false,
       PartitionSchemeHeader *partition_scheme_header = nullptr) {
     return FilterJoinPtr(
         new FilterJoin(probe_child,
@@ -149,6 +152,7 @@ class FilterJoin : public BinaryJoin {
                        project_expressions,
                        build_side_filter_predicate,
                        is_anti_join,
+                       has_repartition,
                        partition_scheme_header));
   }
 
@@ -170,8 +174,10 @@ class FilterJoin : public BinaryJoin {
       const std::vector<expressions::NamedExpressionPtr> &project_expressions,
       const expressions::PredicatePtr &build_side_filter_predicate,
       const bool is_anti_join,
+      const bool has_repartition,
       PartitionSchemeHeader *partition_scheme_header)
-      : BinaryJoin(probe_child, build_child, project_expressions, partition_scheme_header),
+      : BinaryJoin(probe_child, build_child, project_expressions,
+                   has_repartition, partition_scheme_header),
         probe_attributes_(probe_attributes),
         build_attributes_(build_attributes),
         build_side_filter_predicate_(build_side_filter_predicate),

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/c2e26911/query_optimizer/physical/PatternMatcher.hpp
----------------------------------------------------------------------
diff --git a/query_optimizer/physical/PatternMatcher.hpp b/query_optimizer/physical/PatternMatcher.hpp
index 8ae7da0..16466ca 100644
--- a/query_optimizer/physical/PatternMatcher.hpp
+++ b/query_optimizer/physical/PatternMatcher.hpp
@@ -111,7 +111,9 @@ constexpr PhysicalType SomePhysicalNode<PhysicalClass, physical_types...>::kPhys
 // Specializations for all Physical classes.
 
 using SomeAggregate = SomePhysicalNode<Aggregate, PhysicalType::kAggregate>;
-using SomeBinaryJoin = SomePhysicalNode<BinaryJoin, PhysicalType::kHashJoin, PhysicalType::kNestedLoopsJoin>;
+using SomeBinaryJoin = SomePhysicalNode<BinaryJoin, PhysicalType::kFilterJoin,
+                                                    PhysicalType::kHashJoin,
+                                                    PhysicalType::kNestedLoopsJoin>;
 using SomeCopyFrom = SomePhysicalNode<CopyFrom, PhysicalType::kCopyFrom>;
 using SomeCreateTable = SomePhysicalNode<CreateTable, PhysicalType::kCreateTable>;
 using SomeCrossReferenceCoalesceAggregate = SomePhysicalNode<CrossReferenceCoalesceAggregate,

http://git-wip-us.apache.org/repos/asf/incubator-quickstep/blob/c2e26911/query_optimizer/rules/InjectJoinFilters.cpp
----------------------------------------------------------------------
diff --git a/query_optimizer/rules/InjectJoinFilters.cpp b/query_optimizer/rules/InjectJoinFilters.cpp
index 34d0f83..90e81d5 100644
--- a/query_optimizer/rules/InjectJoinFilters.cpp
+++ b/query_optimizer/rules/InjectJoinFilters.cpp
@@ -183,6 +183,7 @@ P::PhysicalPtr InjectJoinFilters::transformHashJoinToFilters(
                                  hash_join->project_expressions(),
                                  build_side_filter_predicate,
                                  is_anti_join,
+                                 hash_join->hasRepartition(),
                                  hash_join->cloneOutputPartitionSchemeHeader());
   }
 
@@ -256,6 +257,7 @@ physical::PhysicalPtr InjectJoinFilters::pushDownFiltersInternal(
                                  E::ToNamedExpressions(probe_child->getOutputAttributes()),
                                  filter_join->build_side_filter_predicate(),
                                  filter_join->is_anti_join(),
+                                 filter_join->hasRepartition(),
                                  filter_join->cloneOutputPartitionSchemeHeader());
   } else {
     return filter_join;
@@ -332,6 +334,7 @@ physical::PhysicalPtr InjectJoinFilters::addFilterAnchors(
     return P::Selection::Create(filter_join,
                                 filter_join->project_expressions(),
                                 nullptr,
+                                filter_join->hasRepartition(),
                                 filter_join->cloneOutputPartitionSchemeHeader());
   } else {
     return output_with_new_children;


Mime
View raw message