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

Function get_nestedSQL

evaluation/test-suite-sql-eval/evaluation.py:205–218  ·  view source on GitHub ↗
(sql)

Source from the content-addressed store, hash-verified

203
204
205def get_nestedSQL(sql):
206 nested = []
207 for cond_unit in sql['from']['conds'][::2] + sql['where'][::2] + sql['having'][::2]:
208 if type(cond_unit[3]) is dict:
209 nested.append(cond_unit[3])
210 if type(cond_unit[4]) is dict:
211 nested.append(cond_unit[4])
212 if sql['intersect'] is not None:
213 nested.append(sql['intersect'])
214 if sql['except'] is not None:
215 nested.append(sql['except'])
216 if sql['union'] is not None:
217 nested.append(sql['union'])
218 return nested
219
220
221def eval_nested(pred, label):

Callers 1

count_component2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected