aboutsummaryrefslogtreecommitdiffstats
path: root/yt/yql/tests/sql/suites/limit/dynamic_limit_offset_overflow.sql
blob: 5452aceb1c9b001c457cb828e312fc9a6e02f94c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
-- YQL-19579
-- Check that offset + limit don't overflow max uin64
use plato;

$limit = -1;
$offset = 2;
$limit = if($limit >= 0, cast($limit as uint64));
$offset = if($offset >= 0, cast($offset as uint64));

$i = select distinct key from Input;

select * from $i order by key
limit $limit offset $offset;