Debian Codegraph @

test/cases/dsl-stats/distinct_count/various/mlr

raw
1 end {
2 outputs = {};
3
4 outputs["distinct_count_0"] = distinct_count(0);
5 outputs["distinct_count_null"] = distinct_count(null);
6 outputs["distinct_count_nonesuch"] = distinct_count(nonesuch);
7
8 outputs["distinct_count_empty_array"] = distinct_count([]);
9 outputs["distinct_count_array_1"] = distinct_count([7]);
10 outputs["distinct_count_array_3a"] = distinct_count([7,8,9]);
11 outputs["distinct_count_array_3b"] = distinct_count([7,7,9]);
12 outputs["distinct_count_array_3c"] = distinct_count([7,7,7]);
13 outputs["distinct_count_array_3d"] = distinct_count([null,null,null]);
14 outputs["distinct_count_array_nested"] = distinct_count([7,[7],7]);
15
16 outputs["distinct_count_empty_map"] = distinct_count({});
17 outputs["distinct_count_map_1"] = distinct_count({ "a" : 7} );
18 outputs["distinct_count_map_3a"] = distinct_count({ "a" : 7, "b" : 8, "c" : 9 } );
19 outputs["distinct_count_map_3b"] = distinct_count({ "a" : 7, "b" : 7, "c" : 9 } );
20 outputs["distinct_count_map_3c"] = distinct_count({ "a" : 7, "b" : 7, "c" : 7 } );
21 outputs["distinct_count_map_3d"] = distinct_count({ "a" : null, "b" : null, "c" : null } );
22 outputs["distinct_count_map_nested"] = distinct_count({ "a" : 7, "b" : [7], "c" : 7 });
23
24 typed_outputs = {};
25
26 for (k, v in outputs) {
27 typed_outputs[k] = v;
28 typed_outputs[k."_type"] = typeof(v);
29 }
30
31 emit typed_outputs;
32 }