-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Results WITH TOTALS were not cached in Query Cache #48677
Labels
potential bug
To be reviewed by developers and confirmed/rejected.
Comments
LiyuTzyAge
added
the
potential bug
To be reviewed by developers and confirmed/rejected.
label
Apr 12, 2023
LiyuTzyAge
changed the title
Results WITH TOTALS were not cached in
Results WITH TOTALS were not cached in Query Cache
Apr 12, 2023
Repro: create or replace table tbl (grp UInt64, kf UInt64) ENGINE = MergeTree order by grp;
insert into tbl values (1, 3), (2, 2), (1, 4), (1, 1);
set allow_experimental_query_cache = 1;
select grp, sum(kf) from tbl group by grp with totals SETTINGS use_query_cache = 1;
select grp, sum(kf) from tbl group by grp with totals SETTINGS use_query_cache = 1; |
Same problem exists for |
@rschu1ze hi, I see that the new implementation with totals will not be cached, but we use a lot of scenes, can you implement it |
Yepp, I'll try |
rschu1ze
added a commit
that referenced
this issue
Apr 17, 2023
Fixes: #48677 Please don't review, still contains garbage
rschu1ze
added a commit
that referenced
this issue
Apr 17, 2023
Fixes: #48677 Please don't review, still contains garbage
rschu1ze
added a commit
that referenced
this issue
Apr 19, 2023
Fixes: #48677 Please don't review, still contains garbage
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe what's wrong
When WITH TOTALS and Query Cache are used in queries, the results returned by query cache do not contain the WITH TOTALS results.
Before the query cache takes effect
:) select t1,count() from t5 group by t1 with totals order by t1 desc limit 11
┌─t1─┬─count()─┐
│ aa │ 28 │
└────┴─────────┘
Totals:
┌─t1─┬─count()─┐
│ │ 28 │
└────┴─────────┘
After the query cache takes effect
:) select t1,count() from t5 group by t1 with totals order by t1 desc limit 11
┌─t1─┬─count()─┐
│ aa │ 28 │
└────┴─────────┘
The text was updated successfully, but these errors were encountered: