aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/join/mapjoin_early_rewrite_sequence.sql
blob: bd93d672183d42083aeb19d628a5c3fd04aaaf1e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* postgres can not */
USE plato;
pragma DisableSimpleColumns;
pragma yt.MapJoinLimit="1m";

$subq = (SELECT key, CAST((CAST(subkey AS Int32) + 1) AS String) AS subkey_plus_one FROM Input);

FROM $subq AS a
JOIN Dict1 AS d1
ON a.subkey_plus_one = d1.subkey
JOIN Dict2 AS d2
ON a.key = d2.key
SELECT * ORDER BY a.key, a.subkey_plus_one;