MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / eval_group

Function eval_group

evaluation/test-suite-sql-eval/evaluation.py:150–162  ·  view source on GitHub ↗
(pred, label)

Source from the content-addressed store, hash-verified

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

Callers 1

eval_partial_matchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected