Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RANGE frame clause in window function not alway needs a ORDER clause #10494

Closed
winoros opened this issue May 15, 2019 · 0 comments · Fixed by #10496
Closed

RANGE frame clause in window function not alway needs a ORDER clause #10494

winoros opened this issue May 15, 2019 · 0 comments · Fixed by #10496
Assignees
Labels
sig/execution SIG execution type/bug The issue is confirmed as a bug.

Comments

@winoros
Copy link
Member

winoros commented May 15, 2019

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 t1(a INT, b CHAR(1), c DATETIME, d BLOB);
INSERT INTO t1 VALUES (1,'x','2010-01-01','blob'), (2, 'y', '2011-01-01', ''),
(3, 'y', '2012-01-01', ''), (4, 't', '2012-01-01', 'blob'),
(5, null, '2013-01-01', null);

SELECT a, b, c, SUM(a) OVER
(RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)
FROM t1;
  1. What did you expect to see?

execute successfully.

  1. What did you see instead?

Panicked.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?
@winoros winoros added type/bug The issue is confirmed as a bug. sig/execution SIG execution labels May 15, 2019
@winoros winoros self-assigned this May 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sig/execution SIG execution type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant