yugabyte/yugabyte-db

YCQL -- Disallow GROUP BY syntax

Open

#13,956 建立於 2022年9月9日

在 GitHub 查看
 (2 留言) (0 反應) (1 負責人)C (1,003 fork)batch import
area/ycqlgood first issuejira-originatedkind/enhancementpriority/high

倉庫指標

Star
 (8,229 star)
PR 合併指標
 (平均合併 17天 21小時) (30 天內合併 92 個 PR)

描述

Jira Link: DB-3446

We don't support the GROUP BY clause in YCQL (only in YSQL) but it is allowed in the syntax (presumably by mistake).

I think the issue is that the group_clause was not disallowed in the parser: https://github.com/yugabyte/yugabyte-db/blob/master/src/yb/yql/cql/ql/parser/parser_gram.y#L2519 (see for instance the PARSER_UNSUPPORTED calls for some of the other sub-cases below -- the should be there for the top-level non-empty case).

In terms of functionality, from this code: https://github.com/yugabyte/yugabyte-db/blob/master/src/yb/yql/cql/ql/parser/parser_gram.y#L2178 it looks like we are just ignoring the GROUP BY clause if set.

Finally, if backwards compatibility is an issue we can make this a warning rather than an error by default (for GROUP BY specifically.

貢獻者指南