EquiInnerExclusion3OptStr.yql 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # ignore runonopt plan diff
  2. (
  3. (let mr_source (DataSource 'yt 'plato))
  4. (let x (Read! world mr_source (Key '('table (String 'Input1))) '('key 'subkey 'value) '()))
  5. (let world (Left! x))
  6. (let table1 (Right! x))
  7. (let table1 (Map table1 (lambda '(item) (AsStruct
  8. '('key (Just (Member item 'key)))
  9. '('subkey (Just (Member item 'subkey)))
  10. '('value (Just (Member item 'value)))))))
  11. (let x (Read! world mr_source (Key '('table (String 'Input2))) '('key 'subkey 'value) '()))
  12. (let world (Left! x))
  13. (let table2 (Right! x))
  14. (let table2 (Map table2 (lambda '(item) (AsStruct
  15. '('key (Just (Member item 'key)))
  16. '('subkey (Just (Member item 'subkey)))
  17. '('value (Just (Member item 'value)))))))
  18. (let x (Read! world mr_source (Key '('table (String 'Input3))) '('key 'subkey 'value) '()))
  19. (let world (Left! x))
  20. (let table3 (Right! x))
  21. (let table3 (Map table3 (lambda '(item) (AsStruct
  22. '('key (Just (Member item 'key)))
  23. '('subkey (Just (Member item 'subkey)))
  24. '('value (Just (Member item 'value)))))))
  25. (let join (EquiJoin '(table1 'a) '(table2 'b) '(table3 'c)
  26. '('Inner
  27. '('Exclusion '"a" '"b" '('"a" '"key") '('"b" '"key" ) '())
  28. '"c" '('"a" '"key") '('"c" '"key") '()) '()))
  29. (let res_sink (DataSink 'result))
  30. (let world (Write! world res_sink (Key) join '('('type))))
  31. (let world (Commit! world res_sink))
  32. (return world)
  33. )