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

DB::Exception: Missing columns #47288

Closed
heyboV opened this issue Mar 7, 2023 · 3 comments · Fixed by #62457
Closed

DB::Exception: Missing columns #47288

heyboV opened this issue Mar 7, 2023 · 3 comments · Fixed by #62457

Comments

@heyboV
Copy link

heyboV commented Mar 7, 2023

I have a SQL such like
select 1 as c0 from ( select C.字段AS字段from ( select 2 as bb) A LEFT JOIN ( select '1' as字段) C ON 1 = 1 LEFT JOIN ( select 1 as a) D ON 1 = 1) asT0whereT0.字段 = '1'
I got a Missing columns Error.
image
When I replace all Chinese characters with English characters, the SQL works。
image
In addition, When I change the alias with some other Chinese characters that different to column name, the SQL also works.
image
Clickhouse Server version is ClickHouse 23.2.3.17.
Is it a bug?
Thanks!

@heyboV heyboV added the question Question? label Mar 7, 2023
@Alex-Cheng
Copy link
Contributor

It should be a bug, I can produce it too and I cannot find a workaround yet.

@den-crane
Copy link
Contributor

@Alex-Cheng provide a repro

@Alex-Cheng
Copy link
Contributor

Alex-Cheng commented Mar 8, 2023

https://fiddle.clickhouse.com/4ab4f391-34b0-42f1-97b0-7e7a5a3b0e0b
or
https://fiddle.clickhouse.com/dcd1a076-f0cb-4937-abd4-91d642bb6ce1

If the alias is all ASCII code, it works well. The issue occur when the alias is Unicode(non-ascii character), such as

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.

4 participants