aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Scheme/SortByDouble.yql
blob: 01624bc5277838651851ad632ee98ac8f44b3bf0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(
(let mr_source (DataSource 'yt 'plato))
(let data (block '(
  (let x (Read! world mr_source (Key '('table (String 'Input))) '('key 'subkey 'value) '()))
  (let world (Left! x))
  (let input (Right! x))
  (let output (Sort input (Bool 'true) (lambda '(item) (block '(
     (return (/ (FromString (Member item 'key) 'Double) (FromString (Member item 'subkey) 'Double)))
  )))))
  (return output)
)))
(let mr_sink (DataSink 'result))
(let world (Write! world mr_sink (Key) data '()))
(let world (Commit! world mr_sink))
(return world)
)