Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/257#discussion_r122482057
  
    --- Diff: query_optimizer/PhysicalGenerator.cpp ---
    @@ -176,6 +177,8 @@ P::PhysicalPtr PhysicalGenerator::optimizePlan() {
         rules.emplace_back(new AttachLIPFilters());
       }
     
    +  rules.push_back(std::make_unique<Partition>(optimizer_context_));
    --- End diff --
    
    I have revisited the partition rule, and think it is ok for now to put it 
between two LIP-related rules, as for `HashJoin` we only have the following 
changes to a physical plan
     1. add additional `Selections` for base tables or subquery relations, and 
a few non-LIP related operators like `sort` and `union all`.
     1. change output `PartitionSchemeHeader` of a Physical Plan node.
    
    But for partitioned aggregation in a follow-up PR, we may add another 
aggregate operator as a finalize step. On the other hand, the original 
aggregation maybe substituted by a newly created aggregation with the same 
input node, so I put the partition rule before `AttachLIPFilters`.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to