(toks, start_idx, tables_with_alias, schema, default_tables)
| 448 | |
| 449 | |
| 450 | def parse_group_by(toks, start_idx, tables_with_alias, schema, default_tables): |
| 451 | idx = start_idx |
| 452 | len_ = len(toks) |
| 453 | col_units = [] |
| 454 | |
| 455 | if idx >= len_ or toks[idx] != 'group': |
| 456 | return idx, col_units |
| 457 | |
| 458 | idx += 1 |
| 459 | assert toks[idx] == 'by' |
| 460 | idx += 1 |
| 461 | |
| 462 | while idx < len_ and not (toks[idx] in CLAUSE_KEYWORDS or toks[idx] in (")", ";")): |
| 463 | idx, col_unit = parse_col_unit(toks, idx, tables_with_alias, schema, default_tables) |
| 464 | col_units.append(col_unit) |
| 465 | if idx < len_ and toks[idx] == ',': |
| 466 | idx += 1 # skip ',' |
| 467 | else: |
| 468 | break |
| 469 | |
| 470 | return idx, col_units |
| 471 | |
| 472 | |
| 473 | def parse_order_by(toks, start_idx, tables_with_alias, schema, default_tables): |
no test coverage detected