-
Notifications
You must be signed in to change notification settings - Fork 56
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
Query table_comments without unrolling with UNION ALL #357
Query table_comments without unrolling with UNION ALL #357
Conversation
57b3b80
to
3177f04
Compare
3177f04
to
8029d67
Compare
@mdesmet thanks, updated |
It was raised as an issue some time ago that I remember that we measure that, and after refactor from The reason for this is that the I think that we shouldn't revert changes from this PR #273 |
It is into the connector. Good catch. |
@damian3031 @mdesmet this should do the trick: trinodb/trino#19259 |
8029d67
to
2e5d310
Compare
`table_comments` is equally "hard" for the engine as `information_schema.columns`. Avoid optimizing the query on the `dbt` side by sending `UNION ALL` with individual schemas. Let the engine figure out the optimal strategy.
2e5d310
to
56b1459
Compare
Rebased to resolve conflicts. Decided not to modify the new code branch added in the meantime in 7bc9ae5, because that could lead to performance degradation due to metadata queries not being smart enough to optimize OR conditions (see also https://github.com/starburstdata/dbt-trino/pull/368/files#r1390942314). |
Build is green. Looking fwd to review comments! |
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.
LGTM
Is Galaxy already updated to the version which supports IN predicate pushdown in metadata listing API?
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.
Changes are ok, but IMHO we should wait for Galaxy update with IN predicate pushdown and test it once again. We can merge it, but then let's definitely wait with a release until Galaxy update.
Thanks for the merge! |
Overview
table_comments
is equally "hard" for the engine asinformation_schema.columns
. Avoid optimizing the query on thedbt
side by sendingUNION ALL
with individual schemas. Let the engine figure out the optimal strategy.Checklist
README.md
updated and added information about my changechangie new
to create a changelog entry