Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extra columns have been read after mv rewrite for query with predicates #45272

Closed
ABingHuang opened this issue May 8, 2024 · 0 comments · Fixed by #45274
Closed

extra columns have been read after mv rewrite for query with predicates #45272

ABingHuang opened this issue May 8, 2024 · 0 comments · Fixed by #45274
Labels
type/bug Something isn't working

Comments

@ABingHuang
Copy link
Contributor

Steps to reproduce the behavior (Required)

  1. CREATE TABLE '...'
    create materialized view mv1
    refresh manual
    as
    select lo_orderkey, lo_orderdate, lo_linenumber," +
    " sum(lo_quantity) total_quantity," +
    " sum(lo_revenue) as total_revenue," +
    " sum(lo_tax) as total_tax" +
    " from lineorder" +
    " group by lo_orderkey, lo_orderdate, lo_linenumber";

  2. query
    "select lo_orderdate," +
    " sum(lo_quantity) total_quantity," +
    " sum(lo_tax) as total_tax" +
    " from lineorder" +
    " where lo_orderkey = 100" +
    " group by lo_orderdate"

Expected behavior (Required)

the query has been rewritten by mv1 with a projection above mv scan node.

Real behavior (Required)

the query has been rewritten by mv1 without a projection above mv scan node.

StarRocks version (Required)

  • You can get the StarRocks version by executing SQL select current_version()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant