aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Builtins/Nanvl.yqls
blob: 899ddf853d527b13f8239f6741b82748ca1477c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(
#comment
(let mr_source (DataSource 'yt 'plato))
(let x (Read! world mr_source (Key '('table (String 'Input))) '('key 'subkey 'value) '()))
(let world (Left! x))
(let table1 (Right! x))
(let table1map (Map table1 (lambda '(item) (block '(
   (let value (Member item 'value))
   (let newValue value)
   (let x (Float '2))
   (let y (Float '0))
   (let nan (/ y y))
   (let jx (Just x))
   (let jy (Just y))
   (let jnan (Just nan))
   (let n (Nothing (TypeOf jx)))
   (let v (Null))
   (let newValue (Concat newValue (String '" Float => ")))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl y y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl nan y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jx y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jy y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jnan y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl n y) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl y jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl nan jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jx jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jy jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jnan jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl n jy) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl y n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl nan n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jx n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jy n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jnan n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl n n) (Float '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x v) (Float '999))))))
   (let x (Double '2))
   (let y (Double '0))
   (let nan (/ y y))
   (let jx (Just x))
   (let jy (Just y))
   (let jnan (Just nan))
   (let n (Nothing (TypeOf jx)))
   (let newValue (Concat newValue (String '" Double => ")))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl y y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl nan y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jx y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jy y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jnan y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl n y) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl y jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl nan jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jx jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jy jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jnan jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl n jy) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl y n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl nan n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jx n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jy n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl jnan n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl n n) (Double '999))))))
   (let newValue (Concat newValue (Concat (String '" ") (ToString (Coalesce (Nanvl x v) (Double '999))))))
   (let s (Struct))
   (let s (AddMember s 'key (Member item 'key)))
   (let s (AddMember s 'subkey (Member item 'subkey)))
   (let s (AddMember s 'value newValue))
   (return s)
)))))
(let mr_sink (DataSink 'yt (quote plato)))
(let world (Write! world mr_sink (Key '('table (String 'Output))) table1map '('('mode 'append))))
(let world (Commit! world mr_sink))
(return world)
)