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
Partition pruning not working as expected #7948
Comments
Is it reproducible on a stable version as well? |
@victor-perov 19.17.2.4-testing is a stable version even though |
each part has min_max_timestamp.idx file. pruning works with imho in these queries pruning does not work at all, only PK. |
Though maybe I am wrong.
|
It would be nice to get an update on the issue. |
I'm hitting the same issue. Is there any updates? |
related: #15255
seems fixed starting with 20.8 |
Should partition pruning work with functions comming from CTE, for example:
Is this expected that 3 million rows have been processed in this case? |
This is not CTE but scalar alias. It should work. Please share a minimal reproduceable test case. |
I use the same table definition and data as provided above:
|
It's already fixed in #21766 |
ohh, pretty new one. Yes, with the latest version it works as expected. Sorry for the noise and thank you @amosbird |
How to reproduce
Expected behavior
Expect both SELECTS to prune partitions and to read just a single part.
Actual behavior
First query reads one part. Second query reads 12 parts.
Logs
The text was updated successfully, but these errors were encountered: