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
SELECT v.x, r.a, sum(c)
FROM (select 1 x, 2 c) AS v
ANY LEFT JOIN (SELECT 1 x, 2 a) AS r ON v.x = r.x
GROUP BY v.x
DB::Exception: Not found column a in block. There are only columns: x, sum(c).
Expected: DB::Exception: Column r.a is not under aggregate function and not in GROUP BY..
SELECT
dummy,
x
FROMsystem.one
ANY LEFT JOIN
(
SELECT
dummy,
materialize(1) AS x
) AS t2 USING (dummy)
GROUP BY dummy
DB::Exception: Not found column x in block. There are only columns: dummy.
Expected behavior
SELECT
a,
b
FROM
(
SELECTnumberAS a,
number+1AS b
FROMsystem.numbersLIMIT10
)
GROUP BY a
DB::Exception: Column b is not under aggregate function and not in GROUP BY.
Additional context
Correct query - any(x) instead of x
SELECT
dummy,
any(x)
FROMsystem.one
ANY LEFT JOIN
(
SELECT
dummy,
materialize(1) AS x
) AS t2 USING (dummy)
GROUP BY dummy
┌─dummy─┬─any(x)─┐
│ 0 │ 1 │
└───────┴────────┘
Activity
[-]Confusing (wrong error) message.[/-][+]Confusing (wrong) error message.[/+]den-crane commentedon Oct 20, 2019
.
qoega commentedon Apr 13, 2020
Reproducing in 20.4
How to reproduce
DB::Exception: Not found column x in block. There are only columns: dummy.
Expected behavior
DB::Exception: Column
bis not under aggregate function and not in GROUP BY.Additional context
Correct query - any(x) instead of x
alexey-milovidov commentedon Oct 19, 2022
#31796
Close: #4222