-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnullable_field_pass_through.json
More file actions
68 lines (68 loc) · 1.83 KB
/
Copy pathnullable_field_pass_through.json
File metadata and controls
68 lines (68 loc) · 1.83 KB
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
{
"name": "nullable field mode — explicit nil pass-through vs missing error",
"config": {
"_PINEAPPLE_VERSION": "0.10.12",
"pipeline_config": {
"operators": {
"set_nil": {
"type_name": "transform_by_lua",
"lua_script": "function f() return nil end",
"function_for_common": "f",
"function_for_item": "",
"$metadata": {
"common_input": [],
"common_output": ["nullable_field"],
"item_input": [],
"item_output": []
}
},
"read_nullable": {
"type_name": "transform_by_lua",
"lua_script": "function f()\n if nullable_field == nil then\n return 'was_nil'\n else\n return tostring(nullable_field)\n end\nend",
"function_for_common": "f",
"function_for_item": "",
"$metadata": {
"common_input": ["nullable_field"],
"common_output": ["result"],
"item_input": [],
"item_output": []
}
},
"size": {
"type_name": "transform_size",
"$metadata": {
"common_input": [],
"common_output": ["size"],
"item_input": [],
"item_output": []
}
}
},
"pipeline_map": {}
},
"pipeline_group": {
"main": {
"pipeline": ["set_nil", "read_nullable", "size"]
}
},
"flow_contract": {
"common_input": [],
"common_output": ["result", "size"],
"item_input": [],
"item_output": []
}
},
"cases": [
{
"name": "explicit nil is observable via nullable mode",
"request": {
"common": {},
"items": [{"id": "a"}]
},
"expected": {
"common": {"result": "was_nil", "size": 1},
"items": [{}]
}
}
]
}