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 *
FROM
(
SELECT *
FROM
(
SELECT
name,
age
FROM users
)
GROUP BY
1,
2
)
reports the following error: DB::Exception: Illegal value for positional argument in GROUP BY: While processing SELECT * FROM (SELECT name, age FROM users) GROUP BY 1, 2. (ILLEGAL_TYPE_OF_ARGUMENT)
Expected behavior:
Alice 50
John 33
Ksenia 48
Additional context
This functionality worked in versions prior to 22.12. Appears to be broken since then.
Replacing the positional arguments with the column names works as expected
It also works when enabling the experimental analyzer
The text was updated successfully, but these errors were encountered:
Describe the issue
A GROUP BY clause with positional arguments will report error when it is nested within a subquery.
How to reproduce
Extract from this fiddle:
reports the following error:
DB::Exception: Illegal value for positional argument in GROUP BY: While processing SELECT * FROM (SELECT name, age FROM users) GROUP BY 1, 2. (ILLEGAL_TYPE_OF_ARGUMENT)
Expected behavior:
Additional context
The text was updated successfully, but these errors were encountered: