Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CTE join BUG #58500

Closed
h1k opened this issue Jan 4, 2024 · 0 comments · Fixed by #62457
Closed

CTE join BUG #58500

h1k opened this issue Jan 4, 2024 · 0 comments · Fixed by #62457

Comments

@h1k
Copy link

h1k commented Jan 4, 2024

Describe the unexpected behaviour
When a CTE expression is used to associate multiple tables, an exception is thrown, indicating that the table does not exist

How to reproduce

  • Which ClickHouse server version to use
    v23.3.18.15-lts
create table t  (ID UInt8) Engine= Memory() ;
insert into t values(1),(2),(3);
with a as (select 1 as column_a) , b as (select 2 as column_b) 
  select * FROM remote('127.0.0.{1,2}', default, t) as c
  inner join a on ID=column_a inner join b on ID=column_b

Expected behavior
Normal query

Error message and/or stacktrace
DB::Exception: Table default.a does not exist. Maybe you meant default.t?. (UNKNOWN_TABLE)

Additional context
Tried multiple versions in fiddle.clickhouse.com and all throw exception
https://fiddle.clickhouse.com/8d772c06-7026-4725-be20-710db3f7db56

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

Successfully merging a pull request may close this issue.

2 participants