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

Function parse_table_unit

evaluation/test-suite-sql-eval/process_sql.py:254–267  ·  view source on GitHub ↗

:returns next idx, table id, table name

(toks, start_idx, tables_with_alias, schema)

Source from the content-addressed store, hash-verified

252
253
254def parse_table_unit(toks, start_idx, tables_with_alias, schema):
255 """
256 :returns next idx, table id, table name
257 """
258 idx = start_idx
259 len_ = len(toks)
260 key = tables_with_alias[toks[idx]]
261
262 if idx + 1 < len_ and toks[idx+1] == "as":
263 idx += 3
264 else:
265 idx += 1
266
267 return idx, schema.idMap[key], key
268
269
270def parse_value(toks, start_idx, tables_with_alias, schema, default_tables=None):

Callers 1

parse_fromFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected