(pred, label)
| 668 | |
| 669 | |
| 670 | def eval_where(pred, label): |
| 671 | pred_conds = [unit for unit in pred['where'][::2]] |
| 672 | label_conds = [unit for unit in label['where'][::2]] |
| 673 | label_wo_agg = [unit[2] for unit in label_conds] |
| 674 | pred_total = len(pred_conds) |
| 675 | label_total = len(label_conds) |
| 676 | cnt = 0 |
| 677 | cnt_wo_agg = 0 |
| 678 | |
| 679 | for unit in pred_conds: |
| 680 | if unit in label_conds: |
| 681 | cnt += 1 |
| 682 | label_conds.remove(unit) |
| 683 | if unit[2] in label_wo_agg: |
| 684 | cnt_wo_agg += 1 |
| 685 | label_wo_agg.remove(unit[2]) |
| 686 | |
| 687 | return label_total, pred_total, cnt, cnt_wo_agg |
| 688 | |
| 689 | |
| 690 | def eval_group(pred, label): |
nothing calls this directly
no outgoing calls
no test coverage detected