| 92 | return v |
| 93 | |
| 94 | def calculate_planner_estimate(self, plan): |
| 95 | plan["Planner Row Estimate Factor"] = 0 |
| 96 | plan["Planner Row Estimate Direction"] = "Under" |
| 97 | |
| 98 | if plan["Plan Rows"] == plan["Actual Rows"]: |
| 99 | return plan |
| 100 | |
| 101 | if plan["Plan Rows"] != 0: |
| 102 | plan["Planner Row Estimate Factor"] = plan["Actual Rows"] / plan["Plan Rows"] |
| 103 | |
| 104 | if plan["Planner Row Estimate Factor"] < 10: |
| 105 | plan["Planner Row Estimate Factor"] = 0 |
| 106 | plan["Planner Row Estimate Direction"] = "Over" |
| 107 | if plan["Actual Rows"] != 0: |
| 108 | plan["Planner Row Estimate Factor"] = plan["Plan Rows"] / plan["Actual Rows"] |
| 109 | return plan |
| 110 | |
| 111 | # |
| 112 | def calculate_actuals(self, plan): |