-
Notifications
You must be signed in to change notification settings - Fork 938
Add vectorized filtering to constraint checking #7972
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
base: main
Are you sure you want to change the base?
Conversation
When backfilling compressed chunks with constraint checking, we need to read and filter compressed tuples in order to confirm constraints are validated. This change adds the ability to do this operation using vectorized decompression and vectorized filtering if the types allow us to do so.
3357ca6
to
2b51915
Compare
BatchMatcher *batch_matcher = | ||
constraints && constraints->vectorized_filtering ? batch_matches_vectorized : batch_matches; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it complicated to do both at the same time? DecompressChunk does this, some filters can be vectorized and some not, and both are supported at the same time.
continue; | ||
} | ||
|
||
VectorPredicate *predicate = get_vector_const_predicate(scankeys[sk].sk_func.fn_oid); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it possible to use vector_qual_make
+ vector_qual_compute
? This will be difficult to maintain, right now we're adding bools here, and then UUIDs, and it looks like it might require separate support here. An example of how this is used is in can_vectorize_aggref
+ vector_agg_exec
.
/* Ignore segmentby columns, they aren't compressed */ | ||
if (ts_array_is_member(settings->fd.segmentby, attname)) | ||
continue; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vector_qual_compute
works for segmentby as well, we use that when computing FILTER clause
When backfilling compressed chunks with constraint checking, we need to read and filter compressed tuples in order to confirm constraints are validated. This change adds the ability to do this operation using vectorized decompression and vectorized filtering if the types allow us to do so.