databend icon indicating copy to clipboard operation
databend copied to clipboard

bug: window func panic err Out of bounds access.

Open TCeason opened this issue 8 months ago • 0 comments

How to reproduce

create table t4(a int, b int, c int);

insert into t4 values (1, 1, 1),(2, 2, 1), (3, 4, 1), (5, 6, 1),(3, 2, 1),(4, 6, 1),(7,8,1),(9,10,1),(8,2,1),(3,5,1),(4,5,1),(2,3,1),(4,2,1),(2,6,1);

SELECT a, lag(a, 2) OVER (ORDER BY c) from t4;
+------+-------------------------------+
| a    | lag(a, 2) over ( order by c ) |
+------+-------------------------------+
|    1 |                          NULL |
|    2 |                          NULL |
|    3 |                             1 |
|    5 |                             2 |
|    3 |                             3 |
|    4 |                             5 |
|    7 |                             3 |
|    9 |                             4 |
|    8 |                             7 |
|    3 |                             9 |
|    4 |                             8 |
|    2 |                             3 |
|    4 |                             4 |
|    2 |                             2 |
+------+-------------------------------+

set max_block_size=2;
  • SELECT a, lag(a, 2) OVER (ORDER BY c) from t4; ERROR 1105 (HY000): PanicError. Code: 1104, Text = Out of bounds access.

TCeason avatar Jun 27 '24 07:06 TCeason