aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Optimizers/ExtendAndFlatmapOptimizeTablePath.yql
blob: ac8743eecacb050bf75c93e8f67708f304776b43 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(
(let mr_sync (DataSink 'result))
(let mr_source (DataSource '"yt" '"plato"))
(let lambda (lambda '(item) (block '(
  (return (AsList (AsStruct '('"path" (TablePath (DependsOn item))))))
))))
(let res (Extend
  (FlatMap (Right! (Read! world mr_source (Key '('table (String '"Input"))) '() '())) lambda)
  (FlatMap (Right! (Read! world mr_source (Key '('table (String '"Input"))) '() '())) lambda)
  (FlatMap (Extend
    (Right! (Read! world mr_source (Key '('table (String '"Input"))) '() '()))) (lambda '(item) (block '(
      (return (AsList (AsStruct '('"path" (String '"Special")))))
))))))
(let world (ResWrite! world mr_sync (Key) res '('('type) '('autoref) '('columns '('"path")))))
(return (Commit! (Commit! world mr_sync) (DataSink '"yt" '"plato")))
)