quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zuyu <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #73: Move hash join's probe and build node ...
Date Tue, 02 Aug 2016 01:08:25 GMT
Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/73#discussion_r73080240
  
    --- Diff: query_optimizer/rules/SwapProbeBuild.hpp ---
    @@ -0,0 +1,46 @@
    +#ifndef QUICKSTEP_QUERY_OPTIMIZER_RULES_SWAP_PROBE_BUILD_HPP_
    +#define QUICKSTEP_QUERY_OPTIMIZER_RULES_SWAP_PROBE_BUILD_HPP_
    +
    +#include <string>
    +
    +#include "query_optimizer/physical/Physical.hpp"
    +#include "query_optimizer/rules/Rule.hpp"
    +#include "query_optimizer/rules/BottomUpRule.hpp"
    +#include "query_optimizer/cost_model/StarSchemaSimpleCostModel.hpp"
    +#include "utility/Macros.hpp"
    +
    +namespace quickstep {
    +namespace optimizer {
    +
    +/** \addtogroup OptimizerRules
    + *  @{
    + */
    +
    +namespace P = ::quickstep::optimizer::physical;
    +namespace E = ::quickstep::optimizer::expressions;
    +namespace C = ::quickstep::optimizer::cost;
    +
    +/**
    + * @brief Rule that applies to a physical plan to arrange probe and
    + *        build side based on the cardinalities.
    + */
    +class SwapProbeBuild : public BottomUpRule<P::Physical> {
    + public:
    +  SwapProbeBuild() {
    +  }
    +
    +  std::string getName() const override { return "SwapProbeBuild"; }
    +
    + protected:
    +  P::PhysicalPtr applyToNode(const P::PhysicalPtr &input) override;
    +
    + private:
    +  DISALLOW_COPY_AND_ASSIGN(SwapProbeBuild);
    +
    +  std::unique_ptr<C::StarSchemaSimpleCostModel> cost_model_;
    --- End diff --
    
    Actually, we should use the base class of the cost model, and initiate some implementation
as @jianqiao suggested.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message