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

Function eval_where

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

Source from the content-addressed store, hash-verified

128
129
130def eval_where(pred, label):
131 pred_conds = [unit for unit in pred['where'][::2]]
132 label_conds = [unit for unit in label['where'][::2]]
133 label_wo_agg = [unit[2] for unit in label_conds]
134 pred_total = len(pred_conds)
135 label_total = len(label_conds)
136 cnt = 0
137 cnt_wo_agg = 0
138
139 for unit in pred_conds:
140 if unit in label_conds:
141 cnt += 1
142 label_conds.remove(unit)
143 if unit[2] in label_wo_agg:
144 cnt_wo_agg += 1
145 label_wo_agg.remove(unit[2])
146
147 return label_total, pred_total, cnt, cnt_wo_agg
148
149
150def eval_group(pred, label):

Callers 1

eval_partial_matchMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected