[X] I had searched in the issues and found no similar issues.
Version
trunk-a49bde8
What's Wrong?
Test table like this
CREATE TABLE `test`
(
`k1` date NOT NULL,
`k2` varchar(180) NOT NULL,
v1 decimal(27,9)
) ENGINE = OLAP UNIQUE KEY(`k1`) COMMENT 'ctas aggregate key column is varchar test'
DISTRIBUTED BY HASH(`k1`) BUCKETS 3
PROPERTIES (
"replication_num" = "1"
);
ctas table sql like this
create table ctas as
SELECT `k2`, sum(v1) AS sumv1
FROM test
GROUP BY k2;
error:
[HY000][1105] Unexpected exception: errCode = 2, detailMessage = Failed to execute CTAS Reason: errCode = 2, detailMessage = Key columns should be a ordered prefix of the schema. KeyColumns[0] (starts from zero) is sumv1, but corresponding column is k2 in the previous columns declaration.
Search before asking
Version
trunk-a49bde8
What's Wrong?
Test table like this
ctas table sql like this
error:
What You Expected?
CTAS succeed
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct