You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Ambiguous column error reported when fully qualifying columns from a table that appears multiple times in the FROM clause #61014
When repeating the same table multiple times in the FROM clause (with and without alias), then fully qualified columns are reported as ambiguous, when they really aren't.
Does it reproduce on the most recent release?
Yes
How to reproduce
Which ClickHouse server version to use: 24.2.1.2248
Which interface to use, if it matters: JDBC (but it doesn't matter)
Non-default settings, if any: N/A
createtablea (i int) engine = Log();
selectdefault.a.i
fromdefault.a,
default.aas x;
Expected behavior
The query should work
Error message and/or stacktrace
Received exception from server (version 24.2.1):
Code: 352. DB::Exception: Received from localhost:9000. DB::Exception: Ambiguous column 'default.a.i': While processing default.a.i. (AMBIGUOUS_COLUMN_NAME)
(query: select
default.a.i
from
default.a,
default.a as x;)
Workaround
Omit full qualification:
createtablea (i int) engine = Log();
selecta.ifromdefault.a,
default.aas x;
Activity
den-crane commentedon Mar 7, 2024
works with analyzer
https://fiddle.clickhouse.com/dde012e9-cab0-4832-a1f7-500235e616f9
lukaseder commentedon Apr 2, 2024
This no longer reproduces with 24.3.1.2672
den-crane commentedon Apr 2, 2024
New analyzer is enabled by default with 24.3.
lukaseder commentedon Apr 2, 2024
Good to know, thanks
Close: #61014