Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Data Model is not Duplicate Key Model, error adding an array type column #12896

Closed
Alittleben opened this issue Nov 3, 2022 · 1 comment · Fixed by #14992
Closed

When Data Model is not Duplicate Key Model, error adding an array type column #12896

Alittleben opened this issue Nov 3, 2022 · 1 comment · Fixed by #14992
Labels
type/bug Something isn't working

Comments

@Alittleben
Copy link
Contributor

Steps to reproduce the behavior (Required)

CREATE TABLE test_add_array_column
(
col1 varchar(65533) not NULL COMMENT "",
col2 bigint(20) NULL COMMENT "",
col3 varchar(65533) NULL COMMENT "",
arr1 ARRAY< varchar (65533)> NULL
) ENGINE = OLAP PRIMARY KEY(col1)
DISTRIBUTED BY HASH(col1) BUCKETS 3
PROPERTIES (
"replication_num" = "3",
"in_memory" = "false",
"storage_format" = "DEFAULT",
"enable_persistent_index" = "false"
);

INSERT INTO test_add_array_column
WITH LABEL insert_load_test_add_array_column
VALUES
("did_001", 12455566, "#en.wikipedia", ["apple", "orange", "pear"]),
("did_002", 12455566, "#ca.wikipedia", []);

ALTER TABLE test_add_array_column
ADD COLUMN arr2 ARRAY< varchar (65533)>;

Expected behavior (Required)

Expected add column is ok

Real behavior (Required)

Error mesage: [42000][1064] ARRAY<VARCHAR(65533)>must be used in DUP_KEYS

StarRocks version (Required)

2.3.0

@Alittleben Alittleben added the type/bug Something isn't working label Nov 3, 2022
@mofeiatwork
Copy link
Contributor

Array type could only be used in duplicated table right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
2 participants