Skip to content

Alter column to null throw exception "Cannot shorten string length" #1920

@HangyuanLiu

Description

@HangyuanLiu

Describe the bug
When I was doing the schema change operation, I wanted to change the non-null type to the nullable type, but I received an exception "Cannot shorten string length"

To Reproduce
1、
CREATE TABLE test_uv_21 (
pin_id bigint(20) NOT NULL COMMENT "",
pin varchar(20) NOT NULL COMMENT "",
user_log_acct hll HLL_UNION NOT NULL COMMENT ""
) ENGINE=OLAP
AGGREGATE KEY(pin_id, pin)
DISTRIBUTED BY HASH(pin_id) BUCKETS 16
PROPERTIES (
"storage_type" = "COLUMN"
)

2、
alter table test_uv_21 modify column pin VARCHAR(20) null;

3、
ERROR 1064 (HY000): Cannot shorten string length

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions