mapjoin_opt_vs_2xopt.sql 493 B

1234567891011121314151617181920212223
  1. use plato;
  2. pragma yt.MapJoinLimit="1m";
  3. $t1 = AsList(
  4. AsStruct(Just(1) AS Key),
  5. AsStruct(Just(2) AS Key),
  6. AsStruct(Just(3) AS Key));
  7. $t2 = AsList(
  8. AsStruct(Just(Just(2)) AS Key),
  9. AsStruct(Just(Just(3)) AS Key),
  10. AsStruct(Just(Just(4)) AS Key),
  11. AsStruct(Just(Just(5)) AS Key),
  12. AsStruct(Just(Just(6)) AS Key));
  13. insert into @t1 select * from as_table($t1);
  14. insert into @t2 select * from as_table($t2);
  15. commit;
  16. select *
  17. from @t1 as a join @t2 as b using(Key);