You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@quickstep.apache.org by jianqiao <gi...@git.apache.org> on 2017/02/05 22:40:23 UTC

[GitHub] incubator-quickstep pull request #180: Fix the bug with SingleIdentityHashFi...

GitHub user jianqiao opened a pull request:

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

    Fix the bug with SingleIdentityHashFilter when filter_cardinality is 0.

    This PR fixes the problem with `SingleIdentityHashFilter` when the estimated filter cardinality is 0 (by setting the filter cardinality to at least 64).

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

    $ git pull https://github.com/apache/incubator-quickstep fix-lip-zero-cardinality

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

    https://github.com/apache/incubator-quickstep/pull/180.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 #180
    
----
commit 12610ac01f94f4f6cf7c91b8a4fb8d1df6e081f2
Author: jianqiao <ji...@node-2.jianqiao.quickstep-pg0.wisc.cloudlab.us>
Date:   2017-02-05T21:46:48Z

    Fix the bug with SingleIdentityHashFilter when filter_cardinality is 0.

----


---
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 #180: Fix the bug with SingleIdentityHashFilter wh...

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

    https://github.com/apache/incubator-quickstep/pull/180
  
    Alternatively, how about not adding a filter when the estimated cardinality is zero?


---
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 #180: Fix the bug with SingleIdentityHashFilter wh...

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

    https://github.com/apache/incubator-quickstep/pull/180
  
    Estimated cardinality being zero means that we expect the relation to be empty or have a small number of tuples. In either case, the created filter is effective and can be used to pre-filter other relations. Otherwise if we don't create such a filter, then there would be no optimization at all.


---
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 #180: Fix the bug with SingleIdentityHashFi...

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

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


---
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 #180: Fix the bug with SingleIdentityHashFilter wh...

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

    https://github.com/apache/incubator-quickstep/pull/180
  
    Assigned to @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 #180: Fix the bug with SingleIdentityHashFi...

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/180#discussion_r99503314
  
    --- Diff: query_optimizer/rules/AttachLIPFilters.cpp ---
    @@ -128,7 +129,7 @@ void AttachLIPFilters::attachLIPFilters(
               lip_filter_configuration_->addBuildInfo(
                   P::SingleIdentityHashFilterBuildInfo::Create(
                       pair.second->source_attribute,
    -                  pair.second->estimated_cardinality * 8),
    +                  std::max(64uL, pair.second->estimated_cardinality * 8u)),
    --- End diff --
    
    Could we add a flag here instead of a hard-coded value?


---
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 #180: Fix the bug with SingleIdentityHashFi...

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

    https://github.com/apache/incubator-quickstep/pull/180#discussion_r99859847
  
    --- Diff: query_optimizer/rules/AttachLIPFilters.cpp ---
    @@ -128,7 +129,7 @@ void AttachLIPFilters::attachLIPFilters(
               lip_filter_configuration_->addBuildInfo(
                   P::SingleIdentityHashFilterBuildInfo::Create(
                       pair.second->source_attribute,
    -                  pair.second->estimated_cardinality * 8),
    +                  std::max(64uL, pair.second->estimated_cardinality * 8u)),
    --- End diff --
    
    It seems that we won't need to change this value. If there are scenarios later that the configuration of this value makes a difference, then we can add a flag for that.


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