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
Trailing commas was added recently (#48438) to support some cases, but it fails if the last expression contains an alias
Works:
Select
sum(number) as s,
number,
FROM numbers(10)
GROUP BY number
Works:
Select
number,
sum(number),
FROM numbers(10)
GROUP BY number
Doesn't work and gives a bad error:
Select
number,
sum(number) as s,
FROM numbers(10)
GROUP BY number
Syntax error: failed at position 47 ('numbers') (line 4, col 6):
Select
number,
sum(number) as s,
FROM numbers(10)
GROUP BY number
Expected one of: token, Dot, OR, AND, IS NULL, IS NOT NULL, BETWEEN, NOT BETWEEN, LIKE, ILIKE, NOT LIKE, NOT ILIKE, REGEXP, IN, NOT IN, GLOBAL IN, GLOBAL NOT IN, MOD, DIV, alias, AS, Comma, FROM, PREWHERE, WHERE, GROUP BY, WITH, HAVING, WINDOW, ORDER BY, LIMIT, OFFSET, SETTINGS, UNION, EXCEPT, INTERSECT, INTO OUTFILE, FORMAT, end of query
Not sure if it belongs here, but is supporting trailing commas in other clauses (i.e. ORDER BY, GROUP BY etc) on the todo list? Lack of support for trailing commas is annoying as it is, but currently it's inconsistent across even a single query: columns can be freely rearranged / commented out in SELECT, but not in other clauses (requires attention to commas). This single matter causes most frustration with Clickhouse so far. Such a great product, but such an ubiquitous (yet seemingly easy to fix) annoyance.
Trailing commas was added recently (#48438) to support some cases, but it fails if the last expression contains an alias
Works:
Works:
Doesn't work and gives a bad error:
Refs #40192
The text was updated successfully, but these errors were encountered: