yugabyte/yugabyte-db

YCQL -- Disallow GROUP BY syntax

Open

#13 956 ouverte le 9 sept. 2022

Voir sur GitHub
 (2 commentaires) (0 réactions) (1 assigné)C (1 003 forks)batch import
area/ycqlgood first issuejira-originatedkind/enhancementpriority/high

Métriques du dépôt

Stars
 (8 229 stars)
Métriques de merge PR
 (Merge moyen 17j 21h) (92 PRs mergées en 30 j)

Description

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.

Guide contributeur