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
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
droptable if exists t1;
createtablet1(a bit(7));
insert into t1 values (126);
selectsum(a) over w, last_value(a) over w from t1 window w as (partition by a);
insert into t1 values (127);
selectsum(a) over w, last_value(a) over w from t1 window w as (partition by a);
2. What did you expect to see? (Required)
mysql>selectsum(a) over w, last_value(a) over w from t1 window w as (partition by a);
Field 1: `sum(a) over w`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: NEWDECIMAL
Collation: binary (63)
Length: 30
Max_length: 3
Decimals: 0
Flags: NUM
Field 2: `last_value(a) over w`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: LONG
Collation: binary (63)
Length: 7
Max_length: 3
Decimals: 0
Flags: UNSIGNED NUM
+---------------+----------------------+
| sum(a) over w | last_value(a) over w |
+---------------+----------------------+
| 126 | 126 |
| 127 | 127 |
+---------------+----------------------+
3. What did you see instead (Required)
mysql>selectsum(a) over w, last_value(a) over w from t1 window w as (partition by a);
Field 1: `sum(a) over w`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: DOUBLE
Collation: binary (63)
Length: 23
Max_length: 3
Decimals: 31
Flags: NOT_NULL BINARY NUM
Field 2: `last_value(a) over w`
Catalog: `def`
Database: ``
Table: ``
Org_table: ``
Type: BIT
Collation: binary (63)
Length: 7
Max_length: 1
Decimals: 0
Flags: UNSIGNED
+---------------+----------------------+
| sum(a) over w | last_value(a) over w |
+---------------+----------------------+
| 126 | ~ |
| 127 | |
+---------------+----------------------+2 rows inset (0.04 sec)
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master: ed52601
release-5.1: befa712
The text was updated successfully, but these errors were encountered: