dynamic_limit_offset_overflow.sql 307 B

1234567891011121314
  1. -- YQL-19579
  2. -- Check that offset + limit don't overflow max uin64
  3. use plato;
  4. $limit = -1;
  5. $offset = 2;
  6. $limit = if($limit >= 0, cast($limit as uint64));
  7. $offset = if($offset >= 0, cast($offset as uint64));
  8. $i = select distinct key from Input;
  9. select * from $i order by key
  10. limit $limit offset $offset;