pingcap/tidb

Expression inside window should not support legacy position indication

Open

#10,521 opened on May 17, 2019

View on GitHub
 (2 comments) (0 reactions) (1 assignee)Go (40,090 stars) (6,186 forks)batch import
help wantedpriority/P4type/compatibility

Description

Bug Report

Please answer these questions before submitting your issue. Thanks!

  1. What did you do? If possible, provide a recipe for reproducing the error.
CREATE TABLE t(i INT, j INT, k INT);
SELECT i/SUM(j) OVER (PARTITION BY kk) AS x FROM t;
  1. What did you expect to see?
ERROR HY000: Window '<unnamed window>': ORDER BY or PARTITION BY uses legacy position indication which is not supported, use expression.
  1. What did you see instead?
Unknown column 'i' in 'field list'
  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

Contributor guide

Expression inside window should not support legacy position indication · pingcap/tidb#10521 | Good First Issue