Comments (3)
I will fix this asap
from clickhouse.
@tavplubix can we get some information about the query that triggered the issue?
from clickhouse.
We're running some tests to find if we can reproduce the issue. Nevertheless, it's likely that even without this bug, we will remove combineFilterAndIndices
in FilterTransform
.
Remind that for vertical FINAL, there're two major steps:
- (1) in merging final step, we don't copy selected row but remember the position of selected row and generate a filter (in the form of list of indices).
- (2) if query has
WHERE
, we will merge this filter with the filter generated byWHERE
expression inFilterTransform
, otherwise we have a filter step right after merging final step.
The feature has been tested thoroughly in our environment. During testing, we hardly found any issue with (1), but we found two issues with (2), including 1 bug and 1 potential performance issue:
- The bug is if there's an additional steps between merging final and filter transform, those steps may change number of rows in the chunk and (2) will not work correctly anymore. At that time, the case we found is when query has
ARRAY JOIN
before filter. We fixed the bug by checking if query has anyARRAY JOIN
beforeWHERE
before applying (2). We thought that the fix is sufficient becauseARRAY JOIN
is the only possible expression that will change number of rows in chunk. - The performance issue is when
WHERE
expression is heavy to compute, (2) may be worse than normal because we need to computeWHERE
on more rows.
Nevertheless, we decided to keep (2). But now with this bug, I think it's rational to remove (2). The bug appears to me that the number of rows in chunk produced by merging final step has been changed before it reaches FilterTransform
. And to be honest, at this point I'm not 100% sure that ARRAY JOIN
is the only possible expression that can change number of rows in a chunk, or how we can guarantee that the FilterTransform
right after merging final step is produced by WHERE
.
So in stead of doing (2), there is a more solid and less error-prone optimization: to leverage the PREWHERE filter in the chunk (if any) to skip row in merging final step.
@tavplubix @nickitat @KochetovNicolai would like to hear your opinion.
cc @jorisgio
from clickhouse.
Related Issues (20)
- CgroupsMemoryUsageObserver pessimizes current memory usage HOT 1
- [RFC] Randomly wrap table expressions into `remote` table function in stateless tests HOT 1
- ACL qestion HOT 8
- Create materialized view from AggregatingMergeTree table HOT 3
- Issue with `version_helper.py` and `changelog.py` after a new releasing scheme HOT 2
- Lots of `HTTPSessionPool: No free connections in pool. Waiting 1000 ms.` when using S3 disks HOT 1
- ANN usearch HOT 1
- Further improvements for working with archives in object storages
- Include client's IP into auth error messages in logs
- HTTP external authenticator not work HOT 1
- CAST('0', 'DateTime') fails but '00000' works HOT 1
- s3queue fails to continue ingesting properly once caught up. HOT 2
- [BUG]: generateSnowflakeID returns value that is in 40 years in the future HOT 2
- How to get the clickhouse source code for the official build? HOT 6
- Remote Postrges columns are not mapped correctly during a JOIN with a WHERE condition HOT 2
- Wrong setting name in 24.5.1 release notes - allow_deprecated_functions doesn't exist, was renamed to allow_deprecated_error_prone_window_functions HOT 1
- `Timeout exceeded while writing to socket` when pausing reading from socket for more than 30 seconds HOT 13
- SnowflakeID type inconsistency (Int64 vs UInt64)
- SSL Handshake errors after upgrading to 24.5.1.1763 HOT 9
- LDAP authorization fails after adding role_mapping
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clickhouse.