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

Function eval_group

hardness_eval.py:690–702  ·  view source on GitHub ↗
(pred, label)

Source from the content-addressed store, hash-verified

688
689
690def eval_group(pred, label):
691 pred_cols = [unit[1] for unit in pred['groupBy']]
692 label_cols = [unit[1] for unit in label['groupBy']]
693 pred_total = len(pred_cols)
694 label_total = len(label_cols)
695 cnt = 0
696 pred_cols = [pred.split(".")[1] if "." in pred else pred for pred in pred_cols]
697 label_cols = [label.split(".")[1] if "." in label else label for label in label_cols]
698 for col in pred_cols:
699 if col in label_cols:
700 cnt += 1
701 label_cols.remove(col)
702 return label_total, pred_total, cnt
703
704
705def eval_having(pred, label):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected