Skip to content

fix(ddl)!: report unknown column type errors clearly - #4933

Open
donhardman wants to merge 2 commits into
mainfrom
fix/unknown-column
Open

donhardman wants to merge 2 commits into
mainfrom
fix/unknown-column

Conversation

@donhardman

Copy link
Copy Markdown
Member

Misleading CREATE TABLE errors for unsupported column types (double etc.)

create table t(id bigint, id double);
create table t(id bigint, f double);
create table t(f varchar(255));
create table t(f foo);
create table t(f);
alter table t add column g double;

Before

ERROR 1064 (42000): P03: syntax error, unexpected DOUBLE, expecting ',' or ')' near 'double)'
ERROR 1064 (42000): P03: expected 'id', got 'f' near 'double)'

After

P03: unknown column type 'double', use 'float' instead          -- id double / f double
P03: unknown column type 'varchar', use 'string' instead near '(255))'
P03: unknown column type 'foo'
P03: missing or unsupported type for column 'f'
P03: unknown column type 'double', use 'float' instead          -- ALTER ADD/MODIFY COLUMN

double is no longer a reserved word, so it can now be used as a column name.

DDL validation now reports unsupported or missing types more
specifically and suggests database types where applicable.

- stop recognizing DOUBLE as a dedicated DDL token
- suggest database types for unknown column types
- report missing or unsupported types for required id columns
- improve UUID column type validation errors

BREAKING CHANGE: DOUBLE is no longer accepted as a dedicated DDL column
type.

@klirichek klirichek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is perfectly feature to be tested with an ubertest. Why no one provided?

@donhardman

Copy link
Copy Markdown
Member Author

Added tests

@donhardman donhardman assigned klirichek and unassigned donhardman Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants