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

Function eval_having

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

Source from the content-addressed store, hash-verified

703
704
705def eval_having(pred, label):
706 pred_total = label_total = cnt = 0
707 if len(pred['groupBy']) > 0:
708 pred_total = 1
709 if len(label['groupBy']) > 0:
710 label_total = 1
711
712 pred_cols = [unit[1] for unit in pred['groupBy']]
713 label_cols = [unit[1] for unit in label['groupBy']]
714 if pred_total == label_total == 1 \
715 and pred_cols == label_cols \
716 and pred['having'] == label['having']:
717 cnt = 1
718
719 return label_total, pred_total, cnt
720
721
722def eval_order(pred, label):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected