Skip to content

Support join on constant#25894

Merged
vdimir merged 1 commit intoClickHouse:masterfrom
vdimir:join-on-const-to-cross
Nov 8, 2021
Merged

Support join on constant#25894
vdimir merged 1 commit intoClickHouse:masterfrom
vdimir:join-on-const-to-cross

Conversation

@vdimir
Copy link
Copy Markdown
Member

@vdimir vdimir commented Jul 1, 2021

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • New Feature

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Support JOIN ON 1 = 1 that have CROSS JOIN semantic, close #25578.

Note: Joining on false or null not supported, but it's supported in postgress. It requires a bit more changes, I'll add it to this PR or will create other one.

@robot-clickhouse robot-clickhouse added doc-alert pr-feature Pull request with new product feature labels Jul 1, 2021
@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Jul 2, 2021

I suppose #24420 should be merged first

UPD: done, I will merge with master and continue developing this PR

@vdimir vdimir marked this pull request as draft July 22, 2021 13:07
@vdimir vdimir force-pushed the join-on-const-to-cross branch 3 times, most recently from 111583f to a979257 Compare July 26, 2021 13:25
@vdimir vdimir changed the title Support JOIN ON 1 = 1 Support join on constant Jul 26, 2021
@vdimir vdimir marked this pull request as ready for review July 27, 2021 13:48
@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Jul 28, 2021

Functional stateless tests (memory) — fail: 1, passed: 3242, skipped: 14

01079_bad_alters_zookeeper_long looks not related, but test it not flaky

Integration tests (asan) — fail: 34, passed: 68, flaky: 0
Integration tests (thread) — fail: 34, passed: 1088, flaky: 3

test_storage_rabbitmq broken in master

@vdimir
Copy link
Copy Markdown
Member Author

vdimir commented Aug 3, 2021

Do not merge before #21320 because of conflicts

UPD: ready

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Sep 28, 2021

CLA assistant check
All committers have signed the CLA.

@vdimir vdimir marked this pull request as draft September 28, 2021 10:48
@vdimir vdimir force-pushed the join-on-const-to-cross branch from 53a753d to 245f09d Compare October 8, 2021 10:46
@vdimir vdimir marked this pull request as ready for review October 8, 2021 10:48
@KochetovNicolai KochetovNicolai self-assigned this Oct 27, 2021
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If there is nothing to join, maybe we can JOIN from pipeline?
Ok so far.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

What do you mean by JOIN from pipeline ?

Comment on lines 237 to 240
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

btw, query pipeline support chunks without columns but with non-zero num_rows.
It is possible to support such a result for JOIN also (later).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wish this optimisation happened not over AST, but somewhere later.
Like, in case we remove already calculated constants form JOIN ON, and there is no expressions anymore.

I suspect it may be difficult now.

@alexey-milovidov
Copy link
Copy Markdown
Member

@Mergifyio update

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Oct 31, 2021

update

✅ Branch has been successfully updated

Details

@vdimir vdimir force-pushed the join-on-const-to-cross branch from 7dbd7bc to 56bc802 Compare November 8, 2021 12:45
@vdimir vdimir merged commit a9689c0 into ClickHouse:master Nov 8, 2021
@vdimir vdimir deleted the join-on-const-to-cross branch November 8, 2021 12:52
@ka1bi4
Copy link
Copy Markdown
Contributor

ka1bi4 commented Nov 17, 2021

Internal documentation ticket: DOCSUP-18489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature Pull request with new product feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support LEFT JOIN ... ON 1 = 1 expression

6 participants