Typing create table Orders (count (advanced mode), the hint reads:
Next: `double` or type
…with double listed as if it were peer to the rest of the type role. After adding one more space (create table Orders (count ), the full type list appears as expected.
Adding the trailing space is the workaround; the column name itself isn't what's coupling the hint — any partial ident at that position produces the same text.
Why
SQL_TYPE is a Choice between two branches (src/dsl/grammar/sql_create_table.rs:88):
The two-word alias double precision was given a dedicated branch (per the comment, so the per-word Ident validator never has to make sense of double on its own). The completion-probe surfaces both branches' leading tokens: the literal double from the first branch, and the type-name ident role from the second.
Expected
Either:
Fold the double precision form into the regular type list so the hint renders a single coherent "type" suggestion, or
Improve hint synthesis so a two-word alias branch is collapsed into the ident-role hint rather than dangling as a peer literal.
Related to
The other two advanced-mode CREATE TABLE completion bugs (filed separately):
the ( continuation not being suggested
table-level constraints appearing before column-name suggestions
### Observed
Typing `create table Orders (count` (advanced mode), the hint reads:
> Next: \`double\` or type
…with `double` listed as if it were peer to the rest of the type role. After adding one more space (`create table Orders (count `), the full type list appears as expected.
Adding the trailing space is the workaround; the column name itself isn't what's coupling the hint — any partial ident at that position produces the same text.
### Why
`SQL_TYPE` is a `Choice` between two branches (`src/dsl/grammar/sql_create_table.rs:88`):
```rust
DOUBLE_PRECISION_NODES = [Word("double"), Word("precision")]
TYPE_WITH_LENGTH_NODES = [type-name ident, optional length]
```
The two-word alias `double precision` was given a dedicated branch (per the comment, so the per-word `Ident` validator never has to make sense of `double` on its own). The completion-probe surfaces both branches' leading tokens: the literal `double` from the first branch, and the type-name ident role from the second.
### Expected
Either:
- Fold the `double precision` form into the regular type list so the hint renders a single coherent "type" suggestion, or
- Improve hint synthesis so a two-word alias branch is collapsed into the ident-role hint rather than dangling as a peer literal.
### Related to
The other two advanced-mode CREATE TABLE completion bugs (filed separately):
- the `(` continuation not being suggested
- table-level constraints appearing before column-name suggestions
Added ("double", "double precision") to COMPOSITE_CANDIDATES and extended the keyword filter to drop composite openers, so the composite phrase replaces the bare opener instead of appearing alongside it. Tab now offers double precision as a single coherent candidate; bare double no longer appears alongside int/text/etc. in the regular type list.
The partial-typing prose case (create table T (count, no trailing space) is subsumed by #4's IntroProse: while mid-typing the user reads "Type a column name…", then advances to the clean type list once the column name resolves.
Resolved in commit 6f87ad1.
Added `("double", "double precision")` to `COMPOSITE_CANDIDATES` and extended the keyword filter to drop composite openers, so the composite phrase replaces the bare opener instead of appearing alongside it. Tab now offers `double precision` as a single coherent candidate; bare `double` no longer appears alongside `int`/`text`/etc. in the regular type list.
The partial-typing prose case (`create table T (count`, no trailing space) is subsumed by #4's IntroProse: while mid-typing the user reads *"Type a column name…"*, then advances to the clean type list once the column name resolves.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Observed
Typing
create table Orders (count(advanced mode), the hint reads:…with
doublelisted as if it were peer to the rest of the type role. After adding one more space (create table Orders (count), the full type list appears as expected.Adding the trailing space is the workaround; the column name itself isn't what's coupling the hint — any partial ident at that position produces the same text.
Why
SQL_TYPEis aChoicebetween two branches (src/dsl/grammar/sql_create_table.rs:88):The two-word alias
double precisionwas given a dedicated branch (per the comment, so the per-wordIdentvalidator never has to make sense ofdoubleon its own). The completion-probe surfaces both branches' leading tokens: the literaldoublefrom the first branch, and the type-name ident role from the second.Expected
Either:
double precisionform into the regular type list so the hint renders a single coherent "type" suggestion, orRelated to
The other two advanced-mode CREATE TABLE completion bugs (filed separately):
(continuation not being suggestedResolved in commit
6f87ad1.Added
("double", "double precision")toCOMPOSITE_CANDIDATESand extended the keyword filter to drop composite openers, so the composite phrase replaces the bare opener instead of appearing alongside it. Tab now offersdouble precisionas a single coherent candidate; baredoubleno longer appears alongsideint/text/etc. in the regular type list.The partial-typing prose case (
create table T (count, no trailing space) is subsumed by #4's IntroProse: while mid-typing the user reads "Type a column name…", then advances to the clean type list once the column name resolves.