Skip to content

Commit 1dd9281

Browse files
committed
Done getting the results
1 parent ffe1c86 commit 1dd9281

File tree

13 files changed

+1543
-559
lines changed

13 files changed

+1543
-559
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,6 @@ dask-worker-space/
2121
.ipynb
2222
# large spreadsheet
2323
*10M.csv
24+
25+
#temp files
26+
~$*

forms/executor/dbexecutor/dbexecutor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ def execute_formula_plan(self, formula_plan: PlanNode) -> pd.DataFrame:
8484
exec_subtree = scheduler.next_subtree()
8585
is_root_subtree = not scheduler.has_next_subtree()
8686
intermediate_table_name = (
87-
exec_subtree.intermediate_table_name if isinstance(exec_subtree, DBFuncExecNode) else ""
87+
exec_subtree.intermediate_table_name
88+
if isinstance(exec_subtree, DBFuncExecNode)
89+
else ""
8890
)
8991
start_time = time.time()
9092
sql_composable = translate(

forms/executor/dbexecutor/scheduler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525
)
2626
from forms.utils.reference import RefType
2727
from forms.core.catalog import TEMP_TABLE_PREFIX
28+
2829
temp_table_number: int = 0
2930

31+
3032
def break_down_into_subtrees(exec_tree: DBExecNode, enable_pipelining: bool) -> list:
3133
if isinstance(exec_tree, DBFuncExecNode):
3234
set_translatable_to_window(exec_tree)

systests/benchmark.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ def run(
134134
wb.compute_formula(formula_string)
135135
metrics = wb.get_metrics()
136136
output_payload = {
137+
"formula_id": index + 1,
137138
"formula_string": formula_string,
138139
"run": run,
139140
"optimization": optimization_str,

systests/formulas/ICRISAT_formula.csv

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,13 @@
1818
=LOOKUP(F1, E$1:E$14853, D$1:D$14853, 0)
1919
=LOOKUP(F1, E$1:E$14853, D$1:D$14853, 1)
2020
=INDEX(E$1:E$14853,F1)
21+
=SUM(C1:D2, E1:F3)
22+
=SUM(C1:D2, $E$1:F1)
23+
=AVERAGE(C1:D2, $E$1:F1)
24+
=MAX(C1:D2, $E$1:F1)
25+
=C1+D2-E3
26+
=SUM(C1:D2)+E1
27+
=SUMIF(C1:D2, ">15") + E1
28+
=IF(E1>F1, SUM(C1:D2), AVERAGE(E1:F2))
29+
=IF(E1>F1, SUM(C1:D2), LOOKUP(F1, E$1:E$14853, D$1:D$14853, 0))
30+
=IF(F1> 5, C1, IF(F1 < 5, D1, E1))

systests/formulas/test_formula.csv

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
=LOOKUP(F1, E$1:E$14853, D$1:D$14853, 0)
2-
=LOOKUP(F1, E$1:E$14853, D$1:D$14853, 1)
3-
=INDEX(E$1:E$14853,F1)
4-
=IF(E1>F1, G1, H1)
1+
=SUM(C1:D2, E1:F3)
2+
=SUM(C1:D2, $E$1:F1)
3+
=AVERAGE(C1:D2, $E$1:F1)
4+
=MAX(C1:D2, $E$1:F1)
5+
=C1+D2-E3
6+
=SUM(C1:D2)+E1
7+
=SUMIF(C1:D2, ">15") + E1
8+
=IF(E1>F1, SUM(C1:D2), AVERAGE(E1:F2))
9+
=IF(E1>F1, SUM(C1:D2), LOOKUP(F1, E$1:E$14853, D$1:D$14853, 0))
10+
=IF(F1> 5, C1, IF(F1 < 5, D1, E1))

0 commit comments

Comments
 (0)