Skip to content
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

Move PG code out of filter logic #487

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Move PG code out of filter logic #487

wants to merge 1 commit into from

Conversation

Y--
Copy link
Collaborator

@Y-- Y-- commented Dec 10, 2024

No description provided.

Copy link
Collaborator

@JelteF JelteF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some thoughts. The most important one being that I'm not sure if we still need this file long-term given #477, so it might not be worth spending time on changing this file.

include/pgduckdb/pg/datum.hpp Outdated Show resolved Hide resolved
}

#include "pgduckdb/pgduckdb_filter.hpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkaruza do we actually still need this filter logic after your #477 change, because there we're pushing those filters to postgres.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought there were filters we can't push down?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, but those we then also shouldn't receive from DuckDB. They should simply be executed by DuckDB.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yeah because everything will be emitted to DuckDB values after 477 lands. I think you're right. I'll keep this one on standby but will move to another file.

Comment on lines +22 to +24
bool DatumGetBool(Datum datum) {
return ::DatumGetBool(datum);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm kinda worried that for these tiny functions the call overhead of this could be significant. Postgres defines all these as static inline functions.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear, I'm thinking that maybe we should vendor in the required functions from Postgres in our own header instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I was thinking the same - since we decided we didn't really care in a previous PR I went that way, but I was about to ping you exactly for that :-)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, for some other places I wasn't too worried. But these seem like they're likely to be used in the hot-path. Still even the indirection might be fine there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants