| 149 | |
| 150 | |
| 151 | def eval_group(pred, label): |
| 152 | pred_cols = [unit[1] for unit in pred['groupBy']] |
| 153 | label_cols = [unit[1] for unit in label['groupBy']] |
| 154 | pred_total = len(pred_cols) |
| 155 | label_total = len(label_cols) |
| 156 | cnt = 0 |
| 157 | pred_cols = [pred.split(".")[1] if "." in pred else pred for pred in pred_cols] |
| 158 | label_cols = [label.split(".")[1] if "." in label else label for label in label_cols] |
| 159 | for col in pred_cols: |
| 160 | if col in label_cols: |
| 161 | cnt += 1 |
| 162 | label_cols.remove(col) |
| 163 | return label_total, pred_total, cnt |
| 164 | |
| 165 | |
| 166 | def eval_having(pred, label): |