ClickHouse / ClickHouse/pg_clickhouse

Add support for pushdown of UNION queries when they all query the remote

Open
#85 0 comments 0 reactions 0 assignees View on GitHub
enhancement pushdown
Dominant language
C
Stars
283
Forks
21
Avg merge
2d 6h
Merged PRs (30d)
11

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 involves `GetForeignUpperPaths`
>
> `@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 think `prepunion.c` has 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.