You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
createtabletemptest (val int, val1 int);
SELECT val FROM temptest WINDOW w AS (ORDER BY val, val1 RANGE 1 PRECEDING);
Note that there have an unuse window w in select
What did you expect to see?
In Mysql 8.0.16
mysql> create table temptest (val int, val1 int);
Query OK, 0 rows affected (0.05 sec)
mysql>SELECT val FROM temptest WINDOW w AS (ORDER BY val, val1 RANGE 1 PRECEDING);
ERROR 3587 (HY000): Window 'w' with RANGE N PRECEDING/FOLLOWING frame requires exactly one ORDER BY expression, of numericor temporal type
What did you see instead?
In TiDB
mysql> create table temptest (val int, val1 int);
Query OK, 0 rows affected (0.16 sec)
mysql>SELECT val FROM temptest WINDOW w AS (ORDER BY val, val1 RANGE 1 PRECEDING);
Empty set (0.01 sec)
What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
mysql>select tidb_version();
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v3.0.3
Git Commit Hash: 836982c617fbaa42d74616eb9ba9ed4cae46c46b
Git Branch: HEAD
UTC Build Time: 2019-08-3002:42:42
GoVersion: go version go1.12 linux/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+1 row inset (0.00 sec)
The text was updated successfully, but these errors were encountered:
DROPTABLE IF EXISTS temptest;
createtabletemptest (val int, val1 int);
SELECT val FROM temptest WINDOW w AS (ORDER BY val, val1 RANGE 1 PRECEDING);
..
mysql>SELECT val FROM temptest WINDOW w AS (ORDER BY val, val1 RANGE 1 PRECEDING);
Empty set (0.00 sec)
mysql>SELECT tidb_version()\G
***************************1. row ***************************
tidb_version(): Release Version: v4.0.0-beta.2-771-gca41972fb
Edition: Community
Git Commit Hash: ca41972fbac068c8a5de107d9075f09ac68842ac
Git Branch: master
UTC Build Time: 2020-07-1402:41:21
GoVersion: go1.13
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row inset (0.00 sec)
Bug Report
Note that there have an unuse window
w
in selectIn Mysql 8.0.16
In TiDB
tidb-server -V
or runselect tidb_version();
on TiDB)?The text was updated successfully, but these errors were encountered: