Skip to content

alter update behaviour depends on where (can fail with DB::Exception) #4165

@den-crane

Description

@den-crane

Create table sample (a Date, id String) engine=MergeTree order by tuple();
Insert into sample values('2019-01-02','1');

Alter table sample update a='2019-02-20' where id = '1';
DB::Exception: There is no supertype for types String, Date because some of them are String/FixedString and some of them are not

Alter table sample update a='2019-02-20' where 1
Ok

Alter table sample update a=toDate('2019-02-20') where id = '1';
Ok

CH 18.14.18 - 19.1.6

Metadata

Metadata

Labels

comp-mutationsALTER UPDATE/DELETE and mutation execution over parts (including lightweight updates/deletes).sql-compatibilityusability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions