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
droptable if exists t;
CREATETABLEt(i INT, li BIGINT, b VARBINARY(8), lb VARBINARY(24), d DOUBLE GENERATED ALWAYS AS (i*1.0));
INSERT INTO t(i, li, b, lb) VALUES (0, 0, X'0000000000000000', X'000000000000000000000000000000000000000000000000');
INSERT INTO t(i, li, b, lb) VALUES (10, 10, x'0A', x'00000000000000000000000000000000000000000000000A');
SELECT HEX(BIT_AND(b) OVER w), SUM(d) OVER w AS dsum FROM t WINDOW w AS (ORDER BY i ROWS 2 PRECEDING);
IN MYSQL
mysql>SELECT HEX(BIT_AND(b) OVER w), SUM(d) OVER w AS dsum FROM t WINDOW w AS (ORDER BY i ROWS 2 PRECEDING);
ERROR 3513 (HY000): Binary operands of bitwise operators must be of equal length
IN TIDB
mysql>SELECT HEX(BIT_AND(b) OVER w), SUM(d) OVER w AS dsum FROM t WINDOW w AS (ORDER BY i ROWS 2 PRECEDING);
+------------------------+------+
| HEX(BIT_AND(b) OVER w) | dsum |
+------------------------+------+
| 0 | 0 |
| 0 | 10 |
+------------------------+------+2 rows inset, 3 warnings (0.00 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)
The text was updated successfully, but these errors were encountered: