Add support for pushdown of UNION queries when they all query the remote
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Start by studying PostgreSQL's prepunion.c and the GetForeignUpperPaths hook mentioned in the discussion. Determine what core infrastructure is missing for recognizing UNION branches that all belong to the same FDW, then define completion as pushing down UNION queries whose SELECT statements all read from the remote ClickHouse source.
Written by the indexing model from the issue text.
Description
From the Postgres Hackers Discord:
@theory: In an FDW, is there a way to push down a union query when each select within it is from a foreign table?
@Robert Haas: i'm not sure if it's possible, but if it is possible, i would guess that it involvesGetForeignUpperPaths
@theory: I need a tutorial for this stuff…
@tgl: In principle we could support that I think, but I bet there's missing infrastructure that would make it hard. In the case of joins there's some in-core code that recognizes when all the joined tables belong to the same FDW, but I don't thinkprepunion.chas any equivalent. If you're excited about this I suggest working on a patch for that, rather than trying to figure out how to do it without any core support.
@theory: Thanks, super useful information. Will keep it in my mental backlog for sure as I work through learning the FDW stuff, see where there are gaps, and figure out which to try to plug first.
- Dominant language
- C
- Stars
- 284
- Forks
- 21
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 22
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ClickHouse/pg_clickhouse
-
documentation drivers enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
ClickHouse/pg_clickhouse#383 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
ClickHouse/pg_clickhouse#386 ·
Maintainers usually reply within 1 day
-
data types enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
ClickHouse/pg_clickhouse#380 ·
Maintainers usually reply within 1 day
-
enhancement functions pushdown
Difficulty 3/5 1-2 days Newbie friendliness 68/100
ClickHouse/pg_clickhouse#379 ·
Maintainers usually reply within 1 day
-
Push down joins against an aggregated `IN (SELECT … GROUP BY … HAVING)` subquery (TPC-H Q18 shape)Possibly taken @JoshDreamland claimed this 4 days ago. Openenhancement pushdown sql
ClickHouse/pg_clickhouse#378 · 1 assignee ·
Maintainers usually reply within 1 day
All issues in ClickHouse/pg_clickhouse
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
trezor/trezor-firmware#7997 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
area/ysql kind/bug priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
yugabyte/yugabyte-db#34415 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
KhronosGroup/OpenCL-Headers#318 ·
-
0.kind: build failure
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
Maintainers usually reply within 1 day