-
Notifications
You must be signed in to change notification settings - Fork 73
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
Column selection / Filtering / Projections #15
Conversation
3dab29d
to
111f266
Compare
src/quack_types.cpp
Outdated
auto &array_mask = duckdb::FlatVector::Validity(result); | ||
array_mask.SetInvalid(offset); | ||
} else { | ||
Datum value = projections.empty() ? values[i] : values[projections[i]]; |
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.
Can we add tests for the pushdown?
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.
Both to verify that the change is working, but more so to serve as a regression test for any future changes
* Read columns that are needed for query * Skip query if any table is from PG_CATALOG_NAMESPACE or PG_TOAST_NAMESPACE * Thread safe detoasting
111f266
to
24c6c40
Compare
I feel like the last commit should be a separate PR after this one is finished, don't you agree? |
Yeah, i agree but this is one big pile of features right now (probably a lot of testing and experimentation) |
Need also testing part, but that will be added soon |
* Filter tuple on page level
6a92567
to
28e46d3
Compare
* COUNT(*) doesn't require any columns to be retrieved so we only count tuples that pass visibility without fetching.
* Fixed incorrect column id for query filtering * Writing output vector now works with/without projection information
struct varlena *result; | ||
int32 rawsize; | ||
|
||
result = (struct varlena *)duckdb_malloc(VARDATA_COMPRESSED_GET_EXTSIZE(value) + VARHDRSZ); |
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.
duckdb_malloc/free
are just wrappers around malloc
and free
, they don't serve an added benefit
Also these methods are part of the C api, which we're not using here
void *duckdb_malloc(size_t size) {
return malloc(size);
}
void duckdb_free(void *ptr) {
free(ptr);
}
@@ -162,6 +185,24 @@ PostgresHeapSeqScan::ParallelScanState::AssignNextBlockNumber() { | |||
return block_number; | |||
} | |||
|
|||
void | |||
PostgresHeapSeqParallelScanState::PrefetchNextRelationPages(Relation rel) { |
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.
This is currently unused?
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.
Yes, unused - but if this is not something that will be needed will be removed before public release.
closes #11