aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/mapjoin_with_empty_read.sql
blob: eae0db98d5c0fa3123b2a1d5349a9fa88d521835 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PRAGMA DisableSimpleColumns;
/* postgres can not */
/* kikimr can not */
use plato;
pragma yt.mapjoinlimit="1m";

$cnt = (select count(*) from Input);
$offset = ($cnt + 10) ?? 0;

$in1 = (select key from Input where key != "" order by key limit 10 offset $offset);

select * from Input as a
left join $in1 as b on a.key = b.key;

$limit = ($cnt / 100) ?? 0;

$in2 = (select key from Input where key != "" limit $limit);

select * from Input as a
left only join $in2 as b on a.key = b.key;