Closed hf200012 closed 2 years ago
Let me have a look.
Let me have a look.
OK
__DORIS_DELETE_SIGN__
is a built-in field and should not be used when create table. I have tried it and it is normal to not have this field
i meet some error like this issue.
i reproduce it like this :
MySQL [abc]> ADMIN SET FRONTEND CONFIG ("enable_batch_delete_by_default" = "true"); Query OK, 0 rows affected (0.01 sec)
MySQL [abc]> MySQL [abc]> SET show_hidden_columns=true; Query OK, 0 rows affected (0.00 sec)
MySQL [abc]> use aaa
Database changed
MySQL [aaa]> CREATE TABLE expamle_1
( user_id
largeint(40) NOT NULL COMMENT "用户id", username
varchar(50) NOT NULL COMMENT "用户昵称" ) ENGINE=OLAP UNIQUE KEY(user_id
, username
) COMMENT "OLAP" DISTRIBUTED BY HASH(user_id
) BUCKETS 1 PROPERTIES ( "replication_allocation" = "tag.location.default: 1", "in_memory" = "false", "storage_format" = "V2" );
Query OK, 0 rows affected (4.47 sec)
MySQL [aaa]> show create table expamle_1;
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| expamle_1 | CREATE TABLE expamle_1
(
user_id
largeint(40) NOT NULL COMMENT "用户id",
username
varchar(50) NOT NULL COMMENT "用户昵称",
__DORIS_DELETE_SIGN__
tinyint(4) NOT NULL DEFAULT "0" COMMENT "doris delete flag hidden column"
) ENGINE=OLAP
UNIQUE KEY(user_id
, username
)
COMMENT "OLAP"
DISTRIBUTED BY HASH(user_id
) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"in_memory" = "false",
"storage_format" = "V2"
) |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (13.05 sec)
MySQL [aaa]> create table expamle_2 like expamle_1; ERROR 1105 (HY000): errCode = 2, detailMessage = Failed to execute CREATE TABLE LIKE expamle_1. Reason: errCode = 2, detailMessage = Duplicate column name 'DORIS_DELETE_SIGN'
i commit a pr to fix this bug . https://github.com/apache/incubator-doris/pull/9694
@stalary i think it is a bug, please check it
Search before asking
Version
1.0
What's Wrong?
create table vehicle_state_record_1 like vehicle_state_record; ERROR 1105 (HY000): errCode = 2, detailMessage = Failed to execute CREATE TABLE LIKE vehicle_state_record. Reason: errCode = 2, detailMessage = Duplicate column name 'DORIS_DELETE_SIGN'
What You Expected?
success
How to Reproduce?
No response
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct