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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
{
"id": "normalise",
"target": "x86-64-unknown-linux-gnu",
"system_addr": "127.0.0.1:3008",
"mode": "debug",
"nodes": [
{
"id": "node_1",
"parallelism": 1,
"kind": {
"Source": {
"source_type": {
"Scalar": "I64"
},
"successors": [
{
"Local": {
"id": "node_2"
}
}
],
"kind": {
"LocalFile": { "path": "/tmp/normalise_source"}
}
}
}
},
{
"id": "node_2",
"parallelism": 1,
"kind": {
"Task": {
"input_type": {
"Scalar": "I64"
},
"output_type": {
"Scalar": "I64"
},
"weld_code": "|x: i64| x < i64(3)",
"successors": [
{
"Local": {
"id": "node_3"
}
}
],
"predecessor": "node_1",
"kind": "Filter"
}
}
},
{
"id" : "node_3",
"parallelism" : 1,
"kind" : {
"Window": {
"channel_strategy" : "Forward",
"predecessor" : "node2",
"successors" : [
{
"Local" : {
"id" : "node_4"
}
}
],
"assigner" : {
"Tumbling" : {
"length" : 5
}
},
"window_function" : {
"input_type": {
"Scalar": "I64"
},
"output_type": {
"Vector": {
"elem_ty": {
"Scalar": "I64"
}
}
},
"builder_type": {
"Appender": {
"elem_ty": {
"Scalar": "I64"
}
}
},
"builder" : "||appender[i64]",
"udf" : "|e:i64,w:appender[i64]| merge(w,e):appender[i64]",
"materialiser" : "|e: appender[i64]| let elem = result(e); let sum = result(for(elem, merger[i64, +], |b: merger[i64, +], i: i64, e: i64| merge(b, e))); let count = len(elem); let avg = sum / count; result(for(elem, appender[i64], |b: appender[i64], i: i64, e: i64| merge(b, e / avg)))"
},
"time_kind" : "Processing",
"window_kind" : "All"
}
}
},
{
"id": "node_4",
"parallelism": 1,
"kind": {
"Task": {
"input_type": {
"Vector": {
"elem_ty": {
"Scalar": "I64"
}
}
},
"output_type": {
"Scalar": "I64"
},
"weld_code": "|x: vec[i64]| let m = merger[i64, +]; result(for(x, m, |b: merger[i64, +], i, e| merge(b, e + i64(3))))",
"successors": [
{
"Local": {
"id": "node_5"
}
}
],
"predecessor": "node_3",
"kind": "Map"
}
}
},
{
"id": "node_5",
"parallelism": 1,
"kind": {
"Sink": {
"sink_type": {
"Scalar": "I64"
},
"predecessor": "node_4",
"kind": {
"LocalFile": { "path": "/tmp/normalise_sink"}
}
}
}
}
]
}