You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@quickstep.apache.org by dylanpbacon <gi...@git.apache.org> on 2017/11/07 16:56:23 UTC

[GitHub] incubator-quickstep pull request #322: Generalized hash

GitHub user dylanpbacon opened a pull request:

    https://github.com/apache/incubator-quickstep/pull/322

    Generalized hash

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/dylanpbacon/incubator-quickstep Generalized-Hash

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-quickstep/pull/322.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #322
    
----
commit fa50ca8167528d4e14c5d7270de94642be63a893
Author: Dylan Bacon <dy...@gmail.com>
Date:   2017-09-20T19:09:32Z

    Hash-Join-Fuse: Feature added and tests modified.

commit 2981d0d464f7a52b8ac1122c5f717a976113e1d6
Author: Dylan Bacon <dy...@gmail.com>
Date:   2017-11-02T22:42:55Z

    Generalized-Hash: First commit.

----


---

[GitHub] incubator-quickstep pull request #322: Generalized Hash Join - DO NOT MERGE

Posted by dylanpbacon <gi...@git.apache.org>.
Github user dylanpbacon closed the pull request at:

    https://github.com/apache/incubator-quickstep/pull/322


---

[GitHub] incubator-quickstep issue #322: Generalized hash

Posted by dylanpbacon <gi...@git.apache.org>.
Github user dylanpbacon commented on the issue:

    https://github.com/apache/incubator-quickstep/pull/322
  
    Not meant for immediate merging, just collaboration and seeing what's changed. If there's a better way to do this let me know and this PR will be closed.


---

[GitHub] incubator-quickstep pull request #322: Generalized Hash Join - DO NOT MERGE

Posted by zuyu <gi...@git.apache.org>.
Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/322#discussion_r149791914
  
    --- Diff: query_optimizer/ExecutionGenerator.cpp ---
    @@ -1102,6 +1121,320 @@ void ExecutionGenerator::convertHashJoin(const P::HashJoinPtr &physical_plan) {
       }
     }
     
    +void ExecutionGenerator::convertGeneralizedHashJoin(const P::GeneralizedHashJoinPtr &physical_plan) {
    +  // HashJoin is converted to three operators:
    +  //     BuildHash, HashJoin, DestroyHash. The second is the primary operator.
    +
    +  P::PhysicalPtr probe_physical = physical_plan->left();
    +  P::PhysicalPtr build_physical = physical_plan->right();
    +  P::PhysicalPtr second_build_physical = physical_plan->middle();
    +
    +  std::vector<attribute_id> probe_attribute_ids;
    +  std::vector<attribute_id> build_attribute_ids;
    +  std::vector<attribute_id> second_probe_attribute_ids;
    +  std::vector<attribute_id> second_build_attribute_ids;
    +
    +  std::size_t build_cardinality =
    +      cost_model_for_hash_join_->estimateCardinality(build_physical);
    +
    +  std::size_t second_build_cardinality =
    +      cost_model_for_hash_join_->estimateCardinality(second_build_physical);
    +
    +  bool any_probe_attributes_nullable = false;
    +  bool any_build_attributes_nullable = false;
    +  bool any_second_probe_attributes_nullable = false;
    +  bool any_second_build_attributes_nullable = false;
    +
    +  const std::vector<E::AttributeReferencePtr> &left_join_attributes =
    +      physical_plan->left_join_attributes();
    +  for (const E::AttributeReferencePtr &left_join_attribute : left_join_attributes) {
    --- End diff --
    
    We could create functions in the anonymous namespace to set these values.


---