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

Function scan_alias

evaluation/ts_old/spider-master/process_sql.py:150–156  ·  view source on GitHub ↗

Scan the index of 'as' and build the map for all alias

(toks)

Source from the content-addressed store, hash-verified

148
149
150def scan_alias(toks):
151 """Scan the index of 'as' and build the map for all alias"""
152 as_idxs = [idx for idx, tok in enumerate(toks) if tok == 'as']
153 alias = {}
154 for idx in as_idxs:
155 alias[toks[idx+1]] = toks[idx-1]
156 return alias
157
158
159def get_tables_with_alias(schema, toks):

Callers 1

get_tables_with_aliasFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected