kumi 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/golden/array_element/expected/schema_ruby.rb +1 -1
- data/golden/array_index/expected/schema_ruby.rb +1 -1
- data/golden/array_operations/expected/schema_ruby.rb +1 -1
- data/golden/cascade_logic/expected/lir_02_inlined.txt +8 -8
- data/golden/cascade_logic/expected/schema_ruby.rb +1 -1
- data/golden/chained_fusion/expected/lir_02_inlined.txt +36 -36
- data/golden/chained_fusion/expected/lir_03_cse.txt +23 -23
- data/golden/chained_fusion/expected/lir_04_1_loop_fusion.txt +25 -25
- data/golden/chained_fusion/expected/lir_04_loop_invcm.txt +23 -23
- data/golden/chained_fusion/expected/lir_06_const_prop.txt +23 -23
- data/golden/chained_fusion/expected/schema_javascript.mjs +23 -23
- data/golden/chained_fusion/expected/schema_ruby.rb +28 -28
- data/golden/element_arrays/expected/schema_ruby.rb +1 -1
- data/golden/empty_and_null_inputs/expected/lir_02_inlined.txt +18 -18
- data/golden/empty_and_null_inputs/expected/lir_03_cse.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_04_1_loop_fusion.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_04_loop_invcm.txt +17 -17
- data/golden/empty_and_null_inputs/expected/lir_06_const_prop.txt +17 -17
- data/golden/empty_and_null_inputs/expected/schema_javascript.mjs +13 -13
- data/golden/empty_and_null_inputs/expected/schema_ruby.rb +18 -18
- data/golden/game_of_life/expected/lir_02_inlined.txt +1291 -1291
- data/golden/game_of_life/expected/lir_03_cse.txt +396 -396
- data/golden/game_of_life/expected/lir_04_1_loop_fusion.txt +396 -396
- data/golden/game_of_life/expected/lir_04_loop_invcm.txt +396 -396
- data/golden/game_of_life/expected/lir_06_const_prop.txt +396 -396
- data/golden/game_of_life/expected/schema_javascript.mjs +85 -85
- data/golden/game_of_life/expected/schema_ruby.rb +86 -86
- data/golden/hash_keys/expected/schema_ruby.rb +1 -1
- data/golden/hash_value/expected/schema_ruby.rb +1 -1
- data/golden/hierarchical_complex/expected/lir_02_inlined.txt +15 -15
- data/golden/hierarchical_complex/expected/lir_03_cse.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_04_1_loop_fusion.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_04_loop_invcm.txt +1 -1
- data/golden/hierarchical_complex/expected/lir_06_const_prop.txt +1 -1
- data/golden/hierarchical_complex/expected/schema_javascript.mjs +1 -1
- data/golden/hierarchical_complex/expected/schema_ruby.rb +2 -2
- data/golden/inline_rename_scope_leak/expected/schema_ruby.rb +1 -1
- data/golden/input_reference/expected/schema_ruby.rb +1 -1
- data/golden/interleaved_fusion/expected/lir_02_inlined.txt +35 -35
- data/golden/interleaved_fusion/expected/lir_03_cse.txt +26 -26
- data/golden/interleaved_fusion/expected/lir_04_1_loop_fusion.txt +27 -26
- data/golden/interleaved_fusion/expected/lir_04_loop_invcm.txt +26 -26
- data/golden/interleaved_fusion/expected/lir_06_const_prop.txt +26 -26
- data/golden/interleaved_fusion/expected/schema_javascript.mjs +23 -23
- data/golden/interleaved_fusion/expected/schema_ruby.rb +29 -29
- data/golden/let_inline/expected/schema_ruby.rb +1 -1
- data/golden/loop_fusion/expected/lir_02_inlined.txt +17 -17
- data/golden/loop_fusion/expected/lir_03_cse.txt +14 -14
- data/golden/loop_fusion/expected/lir_04_1_loop_fusion.txt +14 -14
- data/golden/loop_fusion/expected/lir_04_loop_invcm.txt +14 -14
- data/golden/loop_fusion/expected/lir_06_const_prop.txt +14 -14
- data/golden/loop_fusion/expected/schema_javascript.mjs +12 -12
- data/golden/loop_fusion/expected/schema_ruby.rb +16 -16
- data/golden/min_reduce_scope/expected/schema_ruby.rb +1 -1
- data/golden/mixed_dimensions/expected/lir_02_inlined.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_03_cse.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_04_1_loop_fusion.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_04_loop_invcm.txt +5 -5
- data/golden/mixed_dimensions/expected/lir_06_const_prop.txt +5 -5
- data/golden/mixed_dimensions/expected/schema_javascript.mjs +3 -3
- data/golden/mixed_dimensions/expected/schema_ruby.rb +6 -6
- data/golden/multirank_hoisting/expected/lir_02_inlined.txt +48 -48
- data/golden/multirank_hoisting/expected/lir_03_cse.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_04_1_loop_fusion.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_04_loop_invcm.txt +35 -35
- data/golden/multirank_hoisting/expected/lir_06_const_prop.txt +35 -35
- data/golden/multirank_hoisting/expected/schema_javascript.mjs +34 -34
- data/golden/multirank_hoisting/expected/schema_ruby.rb +36 -36
- data/golden/nested_hash/expected/schema_ruby.rb +1 -1
- data/golden/reduction_broadcast/expected/lir_02_inlined.txt +30 -30
- data/golden/reduction_broadcast/expected/lir_03_cse.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_04_1_loop_fusion.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_04_loop_invcm.txt +22 -22
- data/golden/reduction_broadcast/expected/lir_06_const_prop.txt +22 -22
- data/golden/reduction_broadcast/expected/schema_javascript.mjs +18 -18
- data/golden/reduction_broadcast/expected/schema_ruby.rb +23 -23
- data/golden/roll/expected/schema_ruby.rb +1 -1
- data/golden/shift/expected/schema_ruby.rb +1 -1
- data/golden/shift_2d/expected/schema_ruby.rb +1 -1
- data/golden/simple_math/expected/schema_ruby.rb +1 -1
- data/golden/streaming_basics/expected/lir_02_inlined.txt +25 -25
- data/golden/streaming_basics/expected/lir_03_cse.txt +13 -13
- data/golden/streaming_basics/expected/lir_04_1_loop_fusion.txt +13 -13
- data/golden/streaming_basics/expected/lir_04_loop_invcm.txt +13 -13
- data/golden/streaming_basics/expected/lir_06_const_prop.txt +13 -13
- data/golden/streaming_basics/expected/schema_javascript.mjs +13 -13
- data/golden/streaming_basics/expected/schema_ruby.rb +14 -14
- data/golden/tuples/expected/schema_ruby.rb +1 -1
- data/golden/tuples_and_arrays/expected/lir_02_inlined.txt +16 -16
- data/golden/tuples_and_arrays/expected/lir_03_cse.txt +13 -13
- data/golden/tuples_and_arrays/expected/lir_04_1_loop_fusion.txt +13 -13
- data/golden/tuples_and_arrays/expected/lir_04_loop_invcm.txt +13 -13
- data/golden/tuples_and_arrays/expected/lir_06_const_prop.txt +13 -13
- data/golden/tuples_and_arrays/expected/schema_javascript.mjs +13 -13
- data/golden/tuples_and_arrays/expected/schema_ruby.rb +14 -14
- data/golden/us_tax_2024/expected/lir_02_inlined.txt +524 -524
- data/golden/us_tax_2024/expected/lir_03_cse.txt +283 -283
- data/golden/us_tax_2024/expected/lir_04_1_loop_fusion.txt +283 -283
- data/golden/us_tax_2024/expected/lir_04_loop_invcm.txt +320 -260
- data/golden/us_tax_2024/expected/lir_06_const_prop.txt +320 -260
- data/golden/us_tax_2024/expected/schema_javascript.mjs +24 -24
- data/golden/us_tax_2024/expected/schema_ruby.rb +25 -25
- data/golden/with_constants/expected/schema_ruby.rb +1 -1
- data/lib/kumi/core/analyzer/passes/lir/inline_declarations_pass.rb +118 -74
- data/lib/kumi/version.rb +1 -1
- metadata +1 -1
@@ -30,37 +30,37 @@
|
|
30
30
|
loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
|
31
31
|
%acc36 = decl_acc :: integer
|
32
32
|
%t37 = load_field departments_el_20["teams"] :: any
|
33
|
-
%
|
34
|
-
loop teams id=L8 in %t37 as el=%
|
35
|
-
%
|
36
|
-
%acc36 = acc_add agg.sum(%acc36, %
|
37
|
-
%
|
38
|
-
%
|
33
|
+
%acc44 = decl_acc :: integer
|
34
|
+
loop teams id=L8 in %t37 as el=%t38, idx=%t39
|
35
|
+
%t40 = load_field t38["headcount"] :: integer
|
36
|
+
%acc36 = acc_add agg.sum(%acc36, %t40) :: integer
|
37
|
+
%t48 = load_field t38["team_name"] :: string
|
38
|
+
%acc44 = acc_add agg.count(%acc44, %t48) :: integer
|
39
39
|
end_loop
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%t24 = call core.div(%
|
40
|
+
%t41 = acc_load %acc36 :: integer
|
41
|
+
%t49 = acc_load %acc44 :: integer
|
42
|
+
%t24 = call core.div(%t41, %t49) :: float
|
43
43
|
yield %t24
|
44
44
|
end_loop
|
45
45
|
)
|
46
46
|
(Declaration is_above_average_team
|
47
47
|
%t25 = load_input "departments" :: array
|
48
48
|
loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
|
49
|
-
%
|
50
|
-
%
|
51
|
-
%
|
52
|
-
loop teams id=L10 in %
|
53
|
-
%
|
54
|
-
%
|
55
|
-
%
|
56
|
-
%
|
49
|
+
%acc56 = decl_acc :: integer
|
50
|
+
%t57 = load_field departments_el_26["teams"] :: any
|
51
|
+
%acc64 = decl_acc :: integer
|
52
|
+
loop teams id=L10 in %t57 as el=%t58, idx=%t59
|
53
|
+
%t60 = load_field t58["headcount"] :: integer
|
54
|
+
%acc56 = acc_add agg.sum(%acc56, %t60) :: integer
|
55
|
+
%t68 = load_field t58["team_name"] :: string
|
56
|
+
%acc64 = acc_add agg.count(%acc64, %t68) :: integer
|
57
57
|
end_loop
|
58
|
-
%
|
59
|
-
%
|
60
|
-
%
|
61
|
-
loop teams id=L7 in %
|
58
|
+
%t61 = acc_load %acc56 :: integer
|
59
|
+
%t69 = acc_load %acc64 :: integer
|
60
|
+
%t53 = call core.div(%t61, %t69) :: float
|
61
|
+
loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
|
62
62
|
%t31 = load_field teams_el_29["headcount"] :: integer
|
63
|
-
%t33 = call core.gt(%t31, %
|
63
|
+
%t33 = call core.gt(%t31, %t53) :: boolean
|
64
64
|
yield %t33
|
65
65
|
end_loop
|
66
66
|
end_loop
|
@@ -30,37 +30,37 @@
|
|
30
30
|
loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
|
31
31
|
%acc36 = decl_acc :: integer
|
32
32
|
%t37 = load_field departments_el_20["teams"] :: any
|
33
|
-
%
|
34
|
-
loop teams id=L8 in %t37 as el=%
|
35
|
-
%
|
36
|
-
%acc36 = acc_add agg.sum(%acc36, %
|
37
|
-
%
|
38
|
-
%
|
33
|
+
%acc44 = decl_acc :: integer
|
34
|
+
loop teams id=L8 in %t37 as el=%t38, idx=%t39
|
35
|
+
%t40 = load_field t38["headcount"] :: integer
|
36
|
+
%acc36 = acc_add agg.sum(%acc36, %t40) :: integer
|
37
|
+
%t48 = load_field t38["team_name"] :: string
|
38
|
+
%acc44 = acc_add agg.count(%acc44, %t48) :: integer
|
39
39
|
end_loop
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%t24 = call core.div(%
|
40
|
+
%t41 = acc_load %acc36 :: integer
|
41
|
+
%t49 = acc_load %acc44 :: integer
|
42
|
+
%t24 = call core.div(%t41, %t49) :: float
|
43
43
|
yield %t24
|
44
44
|
end_loop
|
45
45
|
)
|
46
46
|
(Declaration is_above_average_team
|
47
47
|
%t25 = load_input "departments" :: array
|
48
48
|
loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
|
49
|
-
%
|
50
|
-
%
|
51
|
-
%
|
52
|
-
loop teams id=L10 in %
|
53
|
-
%
|
54
|
-
%
|
55
|
-
%
|
56
|
-
%
|
49
|
+
%acc56 = decl_acc :: integer
|
50
|
+
%t57 = load_field departments_el_26["teams"] :: any
|
51
|
+
%acc64 = decl_acc :: integer
|
52
|
+
loop teams id=L10 in %t57 as el=%t58, idx=%t59
|
53
|
+
%t60 = load_field t58["headcount"] :: integer
|
54
|
+
%acc56 = acc_add agg.sum(%acc56, %t60) :: integer
|
55
|
+
%t68 = load_field t58["team_name"] :: string
|
56
|
+
%acc64 = acc_add agg.count(%acc64, %t68) :: integer
|
57
57
|
end_loop
|
58
|
-
%
|
59
|
-
%
|
60
|
-
%
|
61
|
-
loop teams id=L7 in %
|
58
|
+
%t61 = acc_load %acc56 :: integer
|
59
|
+
%t69 = acc_load %acc64 :: integer
|
60
|
+
%t53 = call core.div(%t61, %t69) :: float
|
61
|
+
loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
|
62
62
|
%t31 = load_field teams_el_29["headcount"] :: integer
|
63
|
-
%t33 = call core.gt(%t31, %
|
63
|
+
%t33 = call core.gt(%t31, %t53) :: boolean
|
64
64
|
yield %t33
|
65
65
|
end_loop
|
66
66
|
end_loop
|
@@ -30,37 +30,37 @@
|
|
30
30
|
loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
|
31
31
|
%acc36 = decl_acc :: integer
|
32
32
|
%t37 = load_field departments_el_20["teams"] :: any
|
33
|
-
%
|
34
|
-
loop teams id=L8 in %t37 as el=%
|
35
|
-
%
|
36
|
-
%acc36 = acc_add agg.sum(%acc36, %
|
37
|
-
%
|
38
|
-
%
|
33
|
+
%acc44 = decl_acc :: integer
|
34
|
+
loop teams id=L8 in %t37 as el=%t38, idx=%t39
|
35
|
+
%t40 = load_field t38["headcount"] :: integer
|
36
|
+
%acc36 = acc_add agg.sum(%acc36, %t40) :: integer
|
37
|
+
%t48 = load_field t38["team_name"] :: string
|
38
|
+
%acc44 = acc_add agg.count(%acc44, %t48) :: integer
|
39
39
|
end_loop
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%t24 = call core.div(%
|
40
|
+
%t41 = acc_load %acc36 :: integer
|
41
|
+
%t49 = acc_load %acc44 :: integer
|
42
|
+
%t24 = call core.div(%t41, %t49) :: float
|
43
43
|
yield %t24
|
44
44
|
end_loop
|
45
45
|
)
|
46
46
|
(Declaration is_above_average_team
|
47
47
|
%t25 = load_input "departments" :: array
|
48
48
|
loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
|
49
|
-
%
|
50
|
-
%
|
51
|
-
%
|
52
|
-
loop teams id=L10 in %
|
53
|
-
%
|
54
|
-
%
|
55
|
-
%
|
56
|
-
%
|
49
|
+
%acc56 = decl_acc :: integer
|
50
|
+
%t57 = load_field departments_el_26["teams"] :: any
|
51
|
+
%acc64 = decl_acc :: integer
|
52
|
+
loop teams id=L10 in %t57 as el=%t58, idx=%t59
|
53
|
+
%t60 = load_field t58["headcount"] :: integer
|
54
|
+
%acc56 = acc_add agg.sum(%acc56, %t60) :: integer
|
55
|
+
%t68 = load_field t58["team_name"] :: string
|
56
|
+
%acc64 = acc_add agg.count(%acc64, %t68) :: integer
|
57
57
|
end_loop
|
58
|
-
%
|
59
|
-
%
|
60
|
-
%
|
61
|
-
loop teams id=L7 in %
|
58
|
+
%t61 = acc_load %acc56 :: integer
|
59
|
+
%t69 = acc_load %acc64 :: integer
|
60
|
+
%t53 = call core.div(%t61, %t69) :: float
|
61
|
+
loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
|
62
62
|
%t31 = load_field teams_el_29["headcount"] :: integer
|
63
|
-
%t33 = call core.gt(%t31, %
|
63
|
+
%t33 = call core.gt(%t31, %t53) :: boolean
|
64
64
|
yield %t33
|
65
65
|
end_loop
|
66
66
|
end_loop
|
@@ -30,37 +30,37 @@
|
|
30
30
|
loop departments id=L5 in %t19 as el=%departments_el_20, idx=%departments_i_21
|
31
31
|
%acc36 = decl_acc :: integer
|
32
32
|
%t37 = load_field departments_el_20["teams"] :: any
|
33
|
-
%
|
34
|
-
loop teams id=L8 in %t37 as el=%
|
35
|
-
%
|
36
|
-
%acc36 = acc_add agg.sum(%acc36, %
|
37
|
-
%
|
38
|
-
%
|
33
|
+
%acc44 = decl_acc :: integer
|
34
|
+
loop teams id=L8 in %t37 as el=%t38, idx=%t39
|
35
|
+
%t40 = load_field t38["headcount"] :: integer
|
36
|
+
%acc36 = acc_add agg.sum(%acc36, %t40) :: integer
|
37
|
+
%t48 = load_field t38["team_name"] :: string
|
38
|
+
%acc44 = acc_add agg.count(%acc44, %t48) :: integer
|
39
39
|
end_loop
|
40
|
-
%
|
41
|
-
%
|
42
|
-
%t24 = call core.div(%
|
40
|
+
%t41 = acc_load %acc36 :: integer
|
41
|
+
%t49 = acc_load %acc44 :: integer
|
42
|
+
%t24 = call core.div(%t41, %t49) :: float
|
43
43
|
yield %t24
|
44
44
|
end_loop
|
45
45
|
)
|
46
46
|
(Declaration is_above_average_team
|
47
47
|
%t25 = load_input "departments" :: array
|
48
48
|
loop departments id=L6 in %t25 as el=%departments_el_26, idx=%departments_i_27
|
49
|
-
%
|
50
|
-
%
|
51
|
-
%
|
52
|
-
loop teams id=L10 in %
|
53
|
-
%
|
54
|
-
%
|
55
|
-
%
|
56
|
-
%
|
49
|
+
%acc56 = decl_acc :: integer
|
50
|
+
%t57 = load_field departments_el_26["teams"] :: any
|
51
|
+
%acc64 = decl_acc :: integer
|
52
|
+
loop teams id=L10 in %t57 as el=%t58, idx=%t59
|
53
|
+
%t60 = load_field t58["headcount"] :: integer
|
54
|
+
%acc56 = acc_add agg.sum(%acc56, %t60) :: integer
|
55
|
+
%t68 = load_field t58["team_name"] :: string
|
56
|
+
%acc64 = acc_add agg.count(%acc64, %t68) :: integer
|
57
57
|
end_loop
|
58
|
-
%
|
59
|
-
%
|
60
|
-
%
|
61
|
-
loop teams id=L7 in %
|
58
|
+
%t61 = acc_load %acc56 :: integer
|
59
|
+
%t69 = acc_load %acc64 :: integer
|
60
|
+
%t53 = call core.div(%t61, %t69) :: float
|
61
|
+
loop teams id=L7 in %t57 as el=%teams_el_29, idx=%teams_i_30
|
62
62
|
%t31 = load_field teams_el_29["headcount"] :: integer
|
63
|
-
%t33 = call core.gt(%t31, %
|
63
|
+
%t33 = call core.gt(%t31, %t53) :: boolean
|
64
64
|
yield %t33
|
65
65
|
end_loop
|
66
66
|
end_loop
|
@@ -34,14 +34,14 @@ export function _avg_headcount_per_dept(input) {
|
|
34
34
|
t19.forEach((departments_el_20, departments_i_21) => {
|
35
35
|
let acc36 = 0;
|
36
36
|
let t37 = departments_el_20["teams"];
|
37
|
-
let
|
38
|
-
t37.forEach((
|
39
|
-
let
|
40
|
-
acc36 +=
|
41
|
-
let
|
42
|
-
|
37
|
+
let acc44 = 0;
|
38
|
+
t37.forEach((t38, t39) => {
|
39
|
+
let t40 = t38["headcount"];
|
40
|
+
acc36 += t40;
|
41
|
+
let t48 = t38["team_name"];
|
42
|
+
acc44 += 1;
|
43
43
|
});
|
44
|
-
let t24 = acc36 /
|
44
|
+
let t24 = acc36 / acc44;
|
45
45
|
out.push(t24);
|
46
46
|
});
|
47
47
|
return out;
|
@@ -52,19 +52,19 @@ export function _is_above_average_team(input) {
|
|
52
52
|
let t25 = input["departments"];
|
53
53
|
t25.forEach((departments_el_26, departments_i_27) => {
|
54
54
|
let out_1 = [];
|
55
|
-
let
|
56
|
-
let
|
57
|
-
let
|
58
|
-
|
59
|
-
let
|
60
|
-
|
61
|
-
let
|
62
|
-
|
55
|
+
let acc56 = 0;
|
56
|
+
let t57 = departments_el_26["teams"];
|
57
|
+
let acc64 = 0;
|
58
|
+
t57.forEach((t58, t59) => {
|
59
|
+
let t60 = t58["headcount"];
|
60
|
+
acc56 += t60;
|
61
|
+
let t68 = t58["team_name"];
|
62
|
+
acc64 += 1;
|
63
63
|
});
|
64
|
-
let
|
65
|
-
|
64
|
+
let t53 = acc56 / acc64;
|
65
|
+
t57.forEach((teams_el_29, teams_i_30) => {
|
66
66
|
let t31 = teams_el_29["headcount"];
|
67
|
-
let t33 = t31 >
|
67
|
+
let t33 = t31 > t53;
|
68
68
|
out_1.push(t33);
|
69
69
|
});
|
70
70
|
out.push(out_1);
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_798dac22208bafc0f2b7f93d43bef5ae4c1d550f52f4c3773c486db02058561a
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -66,16 +66,16 @@ module Kumi::Compiled::KUMI_447413afce4b3071c671c345fe6db361e3d9c77cd6429524b30a
|
|
66
66
|
t19.each_with_index do |departments_el_20, departments_i_21|
|
67
67
|
acc36 = 0
|
68
68
|
t37 = departments_el_20["teams"] || departments_el_20[:teams]
|
69
|
-
|
70
|
-
t37.each_with_index do |
|
71
|
-
|
72
|
-
acc36 +=
|
73
|
-
|
74
|
-
|
69
|
+
acc44 = 0
|
70
|
+
t37.each_with_index do |t38, t39|
|
71
|
+
t40 = t38["headcount"] || t38[:headcount]
|
72
|
+
acc36 += t40
|
73
|
+
t48 = t38["team_name"] || t38[:team_name]
|
74
|
+
acc44 += 1
|
75
75
|
end
|
76
|
-
|
77
|
-
|
78
|
-
t24 =
|
76
|
+
t41 = acc36
|
77
|
+
t49 = acc44
|
78
|
+
t24 = t41 / t49.to_f
|
79
79
|
out << t24
|
80
80
|
end
|
81
81
|
out
|
@@ -86,21 +86,21 @@ module Kumi::Compiled::KUMI_447413afce4b3071c671c345fe6db361e3d9c77cd6429524b30a
|
|
86
86
|
t25 = input["departments"] || input[:departments]
|
87
87
|
t25.each_with_index do |departments_el_26, departments_i_27|
|
88
88
|
out_1 = []
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
89
|
+
acc56 = 0
|
90
|
+
t57 = departments_el_26["teams"] || departments_el_26[:teams]
|
91
|
+
acc64 = 0
|
92
|
+
t57.each_with_index do |t58, t59|
|
93
|
+
t60 = t58["headcount"] || t58[:headcount]
|
94
|
+
acc56 += t60
|
95
|
+
t68 = t58["team_name"] || t58[:team_name]
|
96
|
+
acc64 += 1
|
97
97
|
end
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
98
|
+
t61 = acc56
|
99
|
+
t69 = acc64
|
100
|
+
t53 = t61 / t69.to_f
|
101
|
+
t57.each_with_index do |teams_el_29, teams_i_30|
|
102
102
|
t31 = teams_el_29["headcount"] || teams_el_29[:headcount]
|
103
|
-
t33 = t31 >
|
103
|
+
t33 = t31 > t53
|
104
104
|
out_1 << t33
|
105
105
|
end
|
106
106
|
out << out_1
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_db1001d7afa366cbc106f0cd804e44bfabd8a08bfd109b89c3fd14e89d14266b
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_79b1226afef716b18baad35a6809f5d0b953aec078c87883fca2ae4c23029fe4
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_e33b43acb8aa4e0f0d667f040c07607dbc78bfc52c9993108d5fcfff1f5fb47a
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Autogenerated by Kumi Codegen
|
2
|
-
module Kumi::Compiled::
|
2
|
+
module Kumi::Compiled::KUMI_02882cbdd43383967e13d4c1a8f79cc5045859736335a160b1210f35f11b9f0f
|
3
3
|
def self.from(input_data = nil)
|
4
4
|
instance = Object.new
|
5
5
|
instance.extend(self)
|
@@ -41,11 +41,11 @@
|
|
41
41
|
%t55 = call core.mul(%t53, %t54) :: float
|
42
42
|
%t26 = const 0.9 :: float
|
43
43
|
%t27 = call core.mul(%t55, %t26) :: float
|
44
|
-
%
|
45
|
-
%
|
46
|
-
%
|
47
|
-
%
|
48
|
-
%t29 = select %t51, %t27, %
|
44
|
+
%t56 = load_input "items" :: array
|
45
|
+
%t57 = load_field items_el_22["price"] :: float
|
46
|
+
%t58 = load_field items_el_22["qty"] :: integer
|
47
|
+
%t59 = call core.mul(%t57, %t58) :: float
|
48
|
+
%t29 = select %t51, %t27, %t59 :: float
|
49
49
|
yield %t29
|
50
50
|
end_loop
|
51
51
|
)
|
@@ -63,11 +63,11 @@
|
|
63
63
|
%acc_36 = decl_acc :: float
|
64
64
|
%t37 = load_input "items" :: array
|
65
65
|
loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
|
66
|
-
%
|
67
|
-
%
|
68
|
-
%
|
69
|
-
%
|
70
|
-
%acc_36 = acc_add agg.sum(%acc_36, %
|
66
|
+
%t60 = load_input "items" :: array
|
67
|
+
%t61 = load_field items_el_38["price"] :: float
|
68
|
+
%t62 = load_field items_el_38["qty"] :: integer
|
69
|
+
%t63 = call core.mul(%t61, %t62) :: float
|
70
|
+
%acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
|
71
71
|
end_loop
|
72
72
|
%t41 = acc_load %acc_36 :: float
|
73
73
|
yield %t41
|
@@ -76,23 +76,23 @@
|
|
76
76
|
%acc_42 = decl_acc :: float
|
77
77
|
%t43 = load_input "items" :: array
|
78
78
|
loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
|
79
|
-
%
|
80
|
-
%t67 = load_input "items" :: array
|
81
|
-
%t68 = load_field items_el_44["price"] :: float
|
82
|
-
%t69 = const 100.0 :: float
|
83
|
-
%t70 = call core.gt(%t68, %t69) :: boolean
|
84
|
-
%t71 = load_input "items" :: array
|
85
|
-
%t72 = load_field items_el_44["price"] :: float
|
86
|
-
%t73 = load_field items_el_44["qty"] :: integer
|
87
|
-
%t74 = call core.mul(%t72, %t73) :: float
|
88
|
-
%t63 = const 0.9 :: float
|
89
|
-
%t64 = call core.mul(%t74, %t63) :: float
|
79
|
+
%t64 = load_input "items" :: array
|
90
80
|
%t71 = load_input "items" :: array
|
91
81
|
%t72 = load_field items_el_44["price"] :: float
|
92
|
-
%t73 =
|
93
|
-
%t74 = call core.
|
94
|
-
%
|
95
|
-
%
|
82
|
+
%t73 = const 100.0 :: float
|
83
|
+
%t74 = call core.gt(%t72, %t73) :: boolean
|
84
|
+
%t75 = load_input "items" :: array
|
85
|
+
%t76 = load_field items_el_44["price"] :: float
|
86
|
+
%t77 = load_field items_el_44["qty"] :: integer
|
87
|
+
%t78 = call core.mul(%t76, %t77) :: float
|
88
|
+
%t67 = const 0.9 :: float
|
89
|
+
%t68 = call core.mul(%t78, %t67) :: float
|
90
|
+
%t79 = load_input "items" :: array
|
91
|
+
%t80 = load_field items_el_44["price"] :: float
|
92
|
+
%t81 = load_field items_el_44["qty"] :: integer
|
93
|
+
%t82 = call core.mul(%t80, %t81) :: float
|
94
|
+
%t70 = select %t74, %t68, %t82 :: float
|
95
|
+
%acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
|
96
96
|
end_loop
|
97
97
|
%t47 = acc_load %acc_42 :: float
|
98
98
|
yield %t47
|
@@ -56,10 +56,10 @@
|
|
56
56
|
%acc_36 = decl_acc :: float
|
57
57
|
%t37 = load_input "items" :: array
|
58
58
|
loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
|
59
|
-
%
|
60
|
-
%
|
61
|
-
%
|
62
|
-
%acc_36 = acc_add agg.sum(%acc_36, %
|
59
|
+
%t61 = load_field items_el_38["price"] :: float
|
60
|
+
%t62 = load_field items_el_38["qty"] :: integer
|
61
|
+
%t63 = call core.mul(%t61, %t62) :: float
|
62
|
+
%acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
|
63
63
|
end_loop
|
64
64
|
%t41 = acc_load %acc_36 :: float
|
65
65
|
yield %t41
|
@@ -68,15 +68,15 @@
|
|
68
68
|
%acc_42 = decl_acc :: float
|
69
69
|
%t43 = load_input "items" :: array
|
70
70
|
loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
|
71
|
-
%
|
72
|
-
%
|
73
|
-
%
|
74
|
-
%
|
75
|
-
%
|
76
|
-
%
|
77
|
-
%
|
78
|
-
%
|
79
|
-
%acc_42 = acc_add agg.sum(%acc_42, %
|
71
|
+
%t72 = load_field items_el_44["price"] :: float
|
72
|
+
%t73 = const 100.0 :: float
|
73
|
+
%t77 = load_field items_el_44["qty"] :: integer
|
74
|
+
%t67 = const 0.9 :: float
|
75
|
+
%t74 = call core.gt(%t72, %t73) :: boolean
|
76
|
+
%t78 = call core.mul(%t72, %t77) :: float
|
77
|
+
%t68 = call core.mul(%t78, %t67) :: float
|
78
|
+
%t70 = select %t74, %t68, %t78 :: float
|
79
|
+
%acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
|
80
80
|
end_loop
|
81
81
|
%t47 = acc_load %acc_42 :: float
|
82
82
|
yield %t47
|
@@ -56,10 +56,10 @@
|
|
56
56
|
%acc_36 = decl_acc :: float
|
57
57
|
%t37 = load_input "items" :: array
|
58
58
|
loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
|
59
|
-
%
|
60
|
-
%
|
61
|
-
%
|
62
|
-
%acc_36 = acc_add agg.sum(%acc_36, %
|
59
|
+
%t61 = load_field items_el_38["price"] :: float
|
60
|
+
%t62 = load_field items_el_38["qty"] :: integer
|
61
|
+
%t63 = call core.mul(%t61, %t62) :: float
|
62
|
+
%acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
|
63
63
|
end_loop
|
64
64
|
%t41 = acc_load %acc_36 :: float
|
65
65
|
yield %t41
|
@@ -68,15 +68,15 @@
|
|
68
68
|
%acc_42 = decl_acc :: float
|
69
69
|
%t43 = load_input "items" :: array
|
70
70
|
loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
|
71
|
-
%
|
72
|
-
%
|
73
|
-
%
|
74
|
-
%
|
75
|
-
%
|
76
|
-
%
|
77
|
-
%
|
78
|
-
%
|
79
|
-
%acc_42 = acc_add agg.sum(%acc_42, %
|
71
|
+
%t72 = load_field items_el_44["price"] :: float
|
72
|
+
%t73 = const 100.0 :: float
|
73
|
+
%t77 = load_field items_el_44["qty"] :: integer
|
74
|
+
%t67 = const 0.9 :: float
|
75
|
+
%t74 = call core.gt(%t72, %t73) :: boolean
|
76
|
+
%t78 = call core.mul(%t72, %t77) :: float
|
77
|
+
%t68 = call core.mul(%t78, %t67) :: float
|
78
|
+
%t70 = select %t74, %t68, %t78 :: float
|
79
|
+
%acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
|
80
80
|
end_loop
|
81
81
|
%t47 = acc_load %acc_42 :: float
|
82
82
|
yield %t47
|
@@ -56,10 +56,10 @@
|
|
56
56
|
%acc_36 = decl_acc :: float
|
57
57
|
%t37 = load_input "items" :: array
|
58
58
|
loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
|
59
|
-
%
|
60
|
-
%
|
61
|
-
%
|
62
|
-
%acc_36 = acc_add agg.sum(%acc_36, %
|
59
|
+
%t61 = load_field items_el_38["price"] :: float
|
60
|
+
%t62 = load_field items_el_38["qty"] :: integer
|
61
|
+
%t63 = call core.mul(%t61, %t62) :: float
|
62
|
+
%acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
|
63
63
|
end_loop
|
64
64
|
%t41 = acc_load %acc_36 :: float
|
65
65
|
yield %t41
|
@@ -67,16 +67,16 @@
|
|
67
67
|
(Declaration cart_total_effective
|
68
68
|
%acc_42 = decl_acc :: float
|
69
69
|
%t43 = load_input "items" :: array
|
70
|
-
%
|
71
|
-
%
|
70
|
+
%t73 = const 100.0 :: float
|
71
|
+
%t67 = const 0.9 :: float
|
72
72
|
loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
|
73
|
-
%
|
74
|
-
%
|
75
|
-
%
|
76
|
-
%
|
77
|
-
%
|
78
|
-
%
|
79
|
-
%acc_42 = acc_add agg.sum(%acc_42, %
|
73
|
+
%t72 = load_field items_el_44["price"] :: float
|
74
|
+
%t77 = load_field items_el_44["qty"] :: integer
|
75
|
+
%t74 = call core.gt(%t72, %t73) :: boolean
|
76
|
+
%t78 = call core.mul(%t72, %t77) :: float
|
77
|
+
%t68 = call core.mul(%t78, %t67) :: float
|
78
|
+
%t70 = select %t74, %t68, %t78 :: float
|
79
|
+
%acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
|
80
80
|
end_loop
|
81
81
|
%t47 = acc_load %acc_42 :: float
|
82
82
|
yield %t47
|
@@ -56,10 +56,10 @@
|
|
56
56
|
%acc_36 = decl_acc :: float
|
57
57
|
%t37 = load_input "items" :: array
|
58
58
|
loop items id=L6 in %t37 as el=%items_el_38, idx=%items_i_39
|
59
|
-
%
|
60
|
-
%
|
61
|
-
%
|
62
|
-
%acc_36 = acc_add agg.sum(%acc_36, %
|
59
|
+
%t61 = load_field items_el_38["price"] :: float
|
60
|
+
%t62 = load_field items_el_38["qty"] :: integer
|
61
|
+
%t63 = call core.mul(%t61, %t62) :: float
|
62
|
+
%acc_36 = acc_add agg.sum(%acc_36, %t63) :: float
|
63
63
|
end_loop
|
64
64
|
%t41 = acc_load %acc_36 :: float
|
65
65
|
yield %t41
|
@@ -67,16 +67,16 @@
|
|
67
67
|
(Declaration cart_total_effective
|
68
68
|
%acc_42 = decl_acc :: float
|
69
69
|
%t43 = load_input "items" :: array
|
70
|
-
%
|
71
|
-
%
|
70
|
+
%t73 = const 100.0 :: float
|
71
|
+
%t67 = const 0.9 :: float
|
72
72
|
loop items id=L7 in %t43 as el=%items_el_44, idx=%items_i_45
|
73
|
-
%
|
74
|
-
%
|
75
|
-
%
|
76
|
-
%
|
77
|
-
%
|
78
|
-
%
|
79
|
-
%acc_42 = acc_add agg.sum(%acc_42, %
|
73
|
+
%t72 = load_field items_el_44["price"] :: float
|
74
|
+
%t77 = load_field items_el_44["qty"] :: integer
|
75
|
+
%t74 = call core.gt(%t72, %t73) :: boolean
|
76
|
+
%t78 = call core.mul(%t72, %t77) :: float
|
77
|
+
%t68 = call core.mul(%t78, %t67) :: float
|
78
|
+
%t70 = select %t74, %t68, %t78 :: float
|
79
|
+
%acc_42 = acc_add agg.sum(%acc_42, %t70) :: float
|
80
80
|
end_loop
|
81
81
|
%t47 = acc_load %acc_42 :: float
|
82
82
|
yield %t47
|