-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
From 22.3.2.2 while using aggregate function in WITH clause, with rows inserted, Cannot find column % in source stream, there are only columns: []. (THERE_IS_NO_COLUMN) #36189
Comments
Will be fixed after #23194 will be merged. Currently aggregate declared in WITH part is not visible inside other SELECT query parts. |
@kitaisreal Do you know ETA on that? I am reading through #23194 but can't understand how they are related. Looks like a long-standing issue. |
@NickStepanov Analyzer will be available for evaluation in October and planned for production readiness in December. |
Update: analyzer has been available for evaluation since October 2022 and I confirm that it solved the issue:
But we don't expect production readiness before April. |
When inserting rows into table and after that using WITH max(column) as columnAlias, getting an error:
Received exception from server (version 22.3.3):
Code: 8. DB::Exception: Received from localhost:9000. DB::Exception: Cannot find column
columnAlias
in source stream, there are only columns: []. (THERE_IS_NO_COLUMN)Does it reproduce on recent release?
Same error observed on docker images of these versions:
docker pull clickhouse/clickhouse-server:22.3.3.44
docker pull clickhouse/clickhouse-server:22.3.2.2
How to reproduce
docker run --name test_ch -it --rm clickhouse/clickhouse-server:22.3.3.44
clickhouse-client
insert into test values ('2020-01-01', 'text')
Expected behavior
Should return maximum value for column dt, which in our case is:
┌───────────────maxDt─┐
│ 2020-01-01 00:00:00 │
└─────────────────────┘
Error message and/or stacktrace
Received exception from server (version 22.3.3):
Code: 8. DB::Exception: Received from localhost:9000. DB::Exception: Cannot find column
maxDt
in source stream, there are only columns: []. (THERE_IS_NO_COLUMN)Additional context
Please note that it works fine if we don't use aggregate function like max:
The text was updated successfully, but these errors were encountered: