Advanced-mode create table T only suggests with( for SQL column-def list missing #3

Closed
opened 2026-05-28 14:43:44 +01:00 by oliversturm · 1 comment
oliversturm commented 2026-05-28 14:43:44 +01:00 (Migrated from github.com)

Observed

In advanced mode, typing create table Orders (with a trailing space) shows only with (the simple-mode DSL form) in completions. The SQL form create table Orders ( ... ) is not surfaced.

Expected

Advanced mode should offer both continuations:

  • with pk ... (DSL form, ADR-0009)
  • ( ... ) (SQL form, ADR-0033 §1)

Pointers

  • Walker / probe: src/dsl/walker/mod.rs:293 (completion_probe_in_mode)
  • SQL grammar: src/dsl/grammar/sql_create_table.rs
  • Mode gating happens at command dispatch, not within the create table grammar itself, so the SQL branch must already be reachable here — needs investigation why the probe doesn't list it as a candidate.
### Observed In advanced mode, typing `create table Orders ` (with a trailing space) shows only `with` (the simple-mode DSL form) in completions. The SQL form `create table Orders ( ... )` is not surfaced. ### Expected Advanced mode should offer **both** continuations: - `with pk ...` (DSL form, ADR-0009) - `( ... )` (SQL form, ADR-0033 §1) ### Pointers - Walker / probe: `src/dsl/walker/mod.rs:293` (`completion_probe_in_mode`) - SQL grammar: `src/dsl/grammar/sql_create_table.rs` - Mode gating happens at command dispatch, not within the `create table` grammar itself, so the SQL branch must already be reachable here — needs investigation why the probe doesn't list it as a candidate.
oliversturm commented 2026-05-28 20:01:30 +01:00 (Migrated from github.com)

Resolved in commit 6f87ad1.

The shared-entry-word completion merge in completion_probe_in_mode now fires at any cursor depth (not just the entry-word boundary) and handles Expectation::Punct continuations alongside Word/Literal. At create table T in advanced mode the completion offers both with (DSL form) and ( (SQL form).

A shared-entry candidate whose grammar has already diverged (e.g. SQL CREATE INDEX past create table …) returns Mismatch and is naturally skipped — the viability check stays the gate, not the cursor depth.

Resolved in commit 6f87ad1. The shared-entry-word completion merge in `completion_probe_in_mode` now fires at any cursor depth (not just the entry-word boundary) and handles `Expectation::Punct` continuations alongside `Word`/`Literal`. At `create table T ` in advanced mode the completion offers both `with` (DSL form) and `(` (SQL form). A shared-entry candidate whose grammar has already diverged (e.g. SQL `CREATE INDEX` past `create table …`) returns Mismatch and is naturally skipped — the viability check stays the gate, not the cursor depth.
Sign in to join this conversation.