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

UNKNOWN_IDENTIFIER when using materialized column with join and database name #54317

Closed
tahayk opened this issue Sep 5, 2023 · 2 comments · Fixed by #62185
Closed

UNKNOWN_IDENTIFIER when using materialized column with join and database name #54317

tahayk opened this issue Sep 5, 2023 · 2 comments · Fixed by #62185

Comments

@tahayk
Copy link

tahayk commented Sep 5, 2023

Hello everyone,

Probably this issue is similar to #41964 but with a difference about the database, when you specify database name, it doesn't work. (using v23.8.2.7)

Following the example created by @den-crane :

CREATE DATABASE expl;
USE expl;

CREATE TABLE l (y String)Engine Memory;

CREATE TABLE r (d Date, y String,  ty UInt16 MATERIALIZED toYear(d)) Engine Memory;

select * from l L left join r R on  L.y = R.y  where R.ty >= 2019
DB::Exception: Not found column ty in block. (NOT_FOUND_COLUMN_IN_BLOCK)

select * from l  left join r  on  l.y = r.y  where r.ty >= 2019
OK

select * from expl.l  left join expl.r  on  l.y = r.y  where r.ty >= 2019
DB::Exception: Unknown column: ty, there are only columns d, y. (UNKNOWN_IDENTIFIER
@den-crane
Copy link
Contributor

works with analyzer https://fiddle.clickhouse.com/1056806f-6c05-42fb-81c2-cda55a8f34d5

@adamshugar
Copy link

Having the same issue on server version 23.10.3 revision 54466

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.

3 participants