:returns next idx, table id, table name
(toks, start_idx, tables_with_alias, schema)
| 252 | |
| 253 | |
| 254 | def 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 | |
| 270 | def parse_value(toks, start_idx, tables_with_alias, schema, default_tables=None): |