(toks, start_idx, tables_with_alias, schema, default_tables)
| 419 | |
| 420 | |
| 421 | def parse_group_by(toks, start_idx, tables_with_alias, schema, default_tables): |
| 422 | idx = start_idx |
| 423 | len_ = len(toks) |
| 424 | col_units = [] |
| 425 | |
| 426 | if idx >= len_ or toks[idx] != 'group': |
| 427 | return idx, col_units |
| 428 | |
| 429 | idx += 1 |
| 430 | assert toks[idx] == 'by' |
| 431 | idx += 1 |
| 432 | |
| 433 | while idx < len_ and not (toks[idx] in CLAUSE_KEYWORDS or toks[idx] in (")", ";")): |
| 434 | idx, col_unit = parse_col_unit(toks, idx, tables_with_alias, schema, default_tables) |
| 435 | col_units.append(col_unit) |
| 436 | if idx < len_ and toks[idx] == ',': |
| 437 | idx += 1 # skip ',' |
| 438 | else: |
| 439 | break |
| 440 | |
| 441 | return idx, col_units |
| 442 | |
| 443 | |
| 444 | def parse_order_by(toks, start_idx, tables_with_alias, schema, default_tables): |
no test coverage detected