pingcap / pingcap/docs-cn

文档反馈:TiDB 的 ONLY_FULL_GROUP_BY 目前也不支持 order by 中的字段不在 distinct 中

Open
#15,765 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.8k
Forks
1.2k
Avg merge
1d 16h
Merged PRs (30d)
31

Description

File: /release-7.5/functions-and-operators/aggregate-group-by-functions.md
影响:目前参考 v5.4 版本到 7.5 版本中都是允许的,但是应该是不允许的。

image
目前在 V5.4 版本中复现:https://github.com/pingcap/tidb/issues/4254 场景,是报错:
ERROR 3065 (HY000): Expression #1 of ORDER BY clause is not in SELECT list, references column 'test.t.c' which is not in SELECT list; this is incompatible with DISTINCT

但是文档还是显示这种是合规的,应该是:目前在 TIDB 中也是不合规的。

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open release-7.5/functions-and-operators/aggregate-group-by-functions.md and review the ONLY_FULL_GROUP_BY and DISTINCT examples, using TiDB issue 4254 as the behavior reference. Update the documentation so the ORDER BY expression outside the DISTINCT select list is described as unsupported, then verify the rendered page shows the corrected compliance guidance.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.