You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@quickstep.apache.org by hbdeshmukh <gi...@git.apache.org> on 2016/06/08 16:46:27 UTC

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

GitHub user hbdeshmukh opened a pull request:

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

    Reorder query id parameter in various work order and operator constructors

    This is a follow up of the review comments in PR #8. The query ID parameter used in various constructors of relational operators and work orders is the first parameter.

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

    $ git pull https://github.com/apache/incubator-quickstep reorder-query-id-param

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

    https://github.com/apache/incubator-quickstep/pull/10.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 #10
    
----
commit 15a2114a2c64c05f8a1b23831496fcf606a38d5d
Author: Harshad Deshmukh <hb...@apache.org>
Date:   2016-06-08T14:14:20Z

    Reordered query ID in aggregation operator

commit d67f61e1651cb68243d78728cc1ce6c68bb08fb1
Author: Harshad Deshmukh <hb...@apache.org>
Date:   2016-06-08T14:36:18Z

    Reordered query ID in operators and work orders.
    
    Reordered query ID in CreateIndex.
    
    Reordered query ID in delete.
    
    Reordered query ID in destroy hash.
    
    Reordered query ID in Drop table.
    
    Reordered query ID in Finalize aggregate
    
    Reordered query ID in hash join
    
    Reordered query ID in insert op
    
    Reordered query ID in nested loops
    
    Reordered query ID in rebuild
    
    Reordered query ID in sample
    
    Reordered query ID in save blocks
    
    Reordered query ID in select
    
    Reordered query ID in sort merge
    
    Reordered query ID in sort run
    
    Reordered query ID in table gen
    
    Reorder query ID in text scan
    
    Reordered query ID in update

----


---
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.
---

[GitHub] incubator-quickstep issue #10: Reorder query id parameter in various work or...

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

    https://github.com/apache/incubator-quickstep/pull/10
  
    @hbdeshmukh I have two comments, including an optional. Thanks!


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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

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


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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/10#discussion_r66297653
  
    --- Diff: relational_operators/TextScanOperator.cpp ---
    @@ -234,11 +234,10 @@ void TextScanOperator::receiveFeedbackMessage(const WorkOrder::FeedbackMessage &
       }
     }
     
    -
    --- End diff --
    
    Please reset this change, as we use two lines to separate methods from different classes. In this case, a operator and its work order. Thanks.


---
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.
---

[GitHub] incubator-quickstep issue #10: Reorder query id parameter in various work or...

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

    https://github.com/apache/incubator-quickstep/pull/10
  
    LGTM.


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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

    https://github.com/apache/incubator-quickstep/pull/10#discussion_r66313789
  
    --- Diff: query_optimizer/tests/ExecutionHeuristics_unittest.cpp ---
    @@ -75,12 +75,12 @@ class ExecutionHeuristicsTest : public ::testing::Test {
         std::vector<attribute_id> build_attribute_ids;
         build_attribute_ids.push_back(build_attribute_id);
         QueryPlan::DAGNodeIndex build_operator_index =
    -        query_plan->addRelationalOperator(new BuildHashOperator(*build_relation,
    +        query_plan->addRelationalOperator(new BuildHashOperator(0,  /* dummy query ID */
    --- End diff --
    
    This suggestion will require some work as there are a number of unit tests which need this change.  The dummy query ID flag is informative as of now. We can come back to it later, if that's fine. 


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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/10#discussion_r66296664
  
    --- Diff: query_optimizer/ExecutionGenerator.cpp ---
    @@ -1499,13 +1504,13 @@ void ExecutionGenerator::convertSort(const P::SortPtr &physical_sort) {
       const CatalogRelationInfo *input_relation_info =
           findRelationInfoOutputByPhysical(physical_sort->input());
       const QueryPlan::DAGNodeIndex run_generator_index =
    -      execution_plan_->addRelationalOperator(
    -          new SortRunGenerationOperator(*input_relation_info->relation,
    -                                        *initial_runs_relation,
    -                                        initial_runs_destination_id,
    -                                        sort_run_gen_config_id,
    -                                        input_relation_info->isStoredRelation(),
    -                                        query_handle_->query_id()));
    +      execution_plan_->addRelationalOperator(new SortRunGenerationOperator(
    +          query_handle_->query_id(),
    +          *input_relation_info->relation,
    +          *initial_runs_relation,
    +          initial_runs_destination_id,
    +          sort_run_gen_config_id,
    +          input_relation_info->isStoredRelation()));
    --- End diff --
    
    FYI, the original style of wrapping a line is acceptable based on our code style with at most 120 characters per line.


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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/10#discussion_r66306709
  
    --- Diff: relational_operators/TextScanOperator.cpp ---
    @@ -234,11 +234,10 @@ void TextScanOperator::receiveFeedbackMessage(const WorkOrder::FeedbackMessage &
       }
     }
     
    -
    --- End diff --
    
    I cannot find it from our code style. But I remember I learnt it from some code reviews.
    
    We can ignore this for now, and I would propose to add this to our code style. Thanks!


---
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.
---

[GitHub] incubator-quickstep issue #10: Reorder query id parameter in various work or...

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

    https://github.com/apache/incubator-quickstep/pull/10
  
    Thanks for the review @zuyu 


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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

    https://github.com/apache/incubator-quickstep/pull/10#discussion_r66302611
  
    --- Diff: relational_operators/TextScanOperator.cpp ---
    @@ -234,11 +234,10 @@ void TextScanOperator::receiveFeedbackMessage(const WorkOrder::FeedbackMessage &
       }
     }
     
    -
    --- End diff --
    
    I am not aware of this convention. It seems that many other relational operators don't follow it either. Did we document it somewhere? 


---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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/10#discussion_r66300424
  
    --- Diff: query_optimizer/tests/ExecutionHeuristics_unittest.cpp ---
    @@ -75,12 +75,12 @@ class ExecutionHeuristicsTest : public ::testing::Test {
         std::vector<attribute_id> build_attribute_ids;
         build_attribute_ids.push_back(build_attribute_id);
         QueryPlan::DAGNodeIndex build_operator_index =
    -        query_plan->addRelationalOperator(new BuildHashOperator(*build_relation,
    +        query_plan->addRelationalOperator(new BuildHashOperator(0,  /* dummy query ID */
    --- End diff --
    
    It is up to you to take the following suggestion.
    
    In each unit test, we could have a const member called `query_id`, and pass it to each operator and its work orders.
    
    And it is better to explicitly use a variable to represent the same query id value shared by all the operators, instead of multiple query id `0`s.
    



---
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.
---

[GitHub] incubator-quickstep pull request #10: Reorder query id parameter in various ...

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/10#discussion_r66306794
  
    --- Diff: query_optimizer/tests/ExecutionHeuristics_unittest.cpp ---
    @@ -75,12 +75,12 @@ class ExecutionHeuristicsTest : public ::testing::Test {
         std::vector<attribute_id> build_attribute_ids;
         build_attribute_ids.push_back(build_attribute_id);
         QueryPlan::DAGNodeIndex build_operator_index =
    -        query_plan->addRelationalOperator(new BuildHashOperator(*build_relation,
    +        query_plan->addRelationalOperator(new BuildHashOperator(0,  /* dummy query ID */
    --- End diff --
    
    What do you think of this one? If you prefer as is, I could merge this PR.


---
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.
---