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

Window function panicked when partition by NULL #10456

Closed
winoros opened this issue May 14, 2019 · 0 comments · Fixed by #10488
Closed

Window function panicked when partition by NULL #10456

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

Comments

@winoros
Copy link
Member

winoros commented May 14, 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 float);

INSERT INTO t1 VALUES
   (4,12),(5,2),(9,14),(12,10),(6,8),(5,7),(2,15),(2,15),(15,11),(14,5),(14,240),
   (1,10),(14,5),(5,9),(1,11),(2,5),(11,9),(13,13),(6,187),(8,12),(10,12),(15,14),
   (50,4),(14,3),(166,2),(15,13),(10,12),(48,4),(13,3),(7,10);

SELECT a, b, LEAD (b, 1) OVER (ORDER BY a,b ASC) AS c FROM t1 a ORDER BY a, b, c;
SELECT a, b, LEAD (b, 1) OVER (PARTITION BY NULL ORDER BY a,b ASC) AS c FROM t1 a ORDER BY a, b, c;
  1. What did you expect to see?

The two select return same result.

  1. What did you see instead?

The second one panicked.

  1. What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)?

master 373317f

@winoros winoros added type/bug The issue is confirmed as a bug. sig/execution SIG execution labels May 14, 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