Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Push down all JOIN expressions as JOIN expressions

Open
#253 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
c, postgresql, sql
Domain
backend, databases

Research direction

Start by tracing foreign_join_ok() and the code that moves non-key expressions into remote conditions. Compare how INNER JOIN and SEMI JOIN conditions are handled, then identify existing tests or query-planning checks for these paths; the issue is complete only when the intended pushdown behavior and its efficiency implications are established.

Written by the indexing model from the issue text.

Description

enhancement pushdown

Currently, foreign_join_ok() uses only JOIN key expressions in INNER JOIN and SEMI JOIN expressions: that is, only expressions that reference both the right and left keys using the equality operator. The rest are appended to remote conditions for use in the WHERE clause.

I suspect that ClickHouse used to allow only join key expressions but opened it up to additional expressions later. Today at least one must be a join key expression but other expressions are allowed.

Would it make sense to allow all expressions to be pushed down as JOIN expressions, rather than filtering some to remote conditions (the WHERE clause)? Seems like there might be some efficiencies in that, although maybe the ClickHouse optimizer adjusts appropriately to save cycles and iops?

Dominant language
C
Stars
284
Forks
21
Avg merge
23h 1m
Merged PRs (30d)
20

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ClickHouse/pg_clickhouse

All issues in ClickHouse/pg_clickhouse

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.