pingcap/tidb
Auf GitHub ansehenError should be thrown when there's ASC/DESC with GROUP BY clause
Open
#10.522 geöffnet am 17. Mai 2019
help wantedpriority/P4sig/plannertype/feature-request
Repository-Metriken
- Stars
- (40.090 Stars)
- PR-Merge-Metriken
- (Durchschn. Merge 14T 4h) (346 gemergte PRs in 30 T)
Beschreibung
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do? If possible, provide a recipe for reproducing the error.
CREATE TABLE t1 (id INTEGER, sex CHAR(1));
SELECT sex, AVG(id), ROW_NUMBER() OVER w FROM t1
GROUP BY sex ASC
WINDOW w AS () ORDER BY sex DESC;
- What did you expect to see?
Error ASC or DESC with GROUP BY isn't allowed with window functions; put ASC or DESC in ORDER BY is thrown.
- What did you see instead?
Execute successfully with no warning.
- What version of TiDB are you using (
tidb-server -Vor runselect tidb_version();on TiDB)?