aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Casts/HasNullFalse.yql
blob: 8f253ab7a09e54348d11d938e28a9b32ef8f40dc (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
(

(let config (DataSource 'config))
(let world (Configure! world config 'PureDataSource 'yt))
(let res_sink (DataSink 'result))


# Data
(let value (String 'test))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let value (Int32 '1))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let value (TzDatetime '"1546981200,Europe/Moscow"))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let valye (/ (Float '1) (Float '0)))
(let world (Write! world res_sink (Key) (HasNull value) '()))

# Optional 
(let value (Just (Int32 '1)))
(let world (Write! world res_sink (Key) (HasNull value) '()))

# Tuple 
(let value '((Int32 '1) (String 'test) (Float '1)))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let value '())
(let world (Write! world res_sink (Key) (HasNull value) '()))

# Struct
(let value (AsStruct '('a (Int32 '1)) '('b (String 'one))))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let value (Struct))
(let world (Write! world res_sink (Key) (HasNull value) '()))

# Variant
(let valueType (VariantType (TupleType (DataType 'Int32) (NullType))))
(let value (Variant (Int32 '123) '0 valueType))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let valueType (VariantType (StructType '('a (DataType 'Int32)) '('b (OptionalType (DataType 'String))))))
(let value (Variant (Int32 '1) 'a valueType))
(let world (Write! world res_sink (Key) (HasNull value) '()))

# List 
(let value (AsList (Int32 '1) (Int32 '2) (Int32 '3)))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let value (List (ListType (NullType))))
(let world (Write! world res_sink (Key) (HasNull value) '()))

(let world (Commit! world res_sink))
(return world)
)