Skip to content

Support LEFT JOIN ... ON 1 = 1 expression #25578

@ghost

Description

Usage
Postgres, MySQL, and Oracle support the expression LEFT JOIN ... ON 1 = 1, but ClickHouse does not.

It may be possible to replace LEFT JOIN ... ON 1 = 1 with CROSS JOIN, but I want to use the query in the same form for lots of databases.

Please support the expression LEFT JOIN ... ON 1 = 1.

Detailed SQL

CREATE TABLE test
(
    `name` Nullable(String),
    `id` int
)
ENGINE = Log();

insert into test values ('a', 1) ('b', 2) (null, 3);

select * from test t1 left join (select * from test ) t2 on 1 = 1   
-- DB::Exception: Not equi-join ON expression: 1 = 1. No columns in one of equality side.: While processing 1 = 1.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions