Mryange opened a new pull request, #21782:
URL: https://github.com/apache/doris/pull/21782
## Proposed changes
now
```
mysql [test]>CREATE TABLE IF NOT EXISTS db (
-> `id` int(11) ,
-> `dd` DECIMAL
-> )
-> UNIQUE KEY(`id`)
-> DISTRIBUTED BY HASH(`id`) BUCKETS 10
-> PROPERTIES (
-> "enable_unique_key_merge_on_write" = "true",
-> "replication_num" = "1"
-> );
Query OK, 0 rows affected (0.02 sec)
mysql [test]>desc db;
+-------+---------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-------+---------+-------+
| id | INT | Yes | true | NULL | |
| dd | DECIMAL | Yes | false | NULL | NONE |
+-------+---------+------+-------+---------+-------+
2 rows in set (0.00 sec)
mysql [test]>desc db all;
+-----------+---------------+-------+---------+-----------------+------+-------+---------+-------+---------+------------+-------------+
| IndexName | IndexKeysType | Field | Type | InternalType | Null | Key
| Default | Extra | Visible | DefineExpr | WhereClause |
+-----------+---------------+-------+---------+-----------------+------+-------+---------+-------+---------+------------+-------------+
| db | UNIQUE_KEYS | id | INT | INT | Yes |
true | NULL | | true | | |
| | | dd | DECIMAL | DECIMALV3(9 ,0) | Yes |
false | NULL | NONE | true | | |
+-----------+---------------+-------+---------+-----------------+------+-------+---------+-------+---------+------------+-------------+
2 rows in set (0.00 sec)
mysql [test]>show create table db;
| db | CREATE TABLE `db` (
`id` int(11) NULL,
`dd` DECIMAL NULL
) ENGINE=OLAP
UNIQUE KEY(`id`)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(`id`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"storage_format" = "V2",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false"
);
mysql [test]>CREATE TABLE IF NOT EXISTS db (
-> `id` int(11) NOT NULL ,
-> `str` string ,
-> `dd` decimal(15,6)
-> )
-> UNIQUE KEY(`id`)
-> DISTRIBUTED BY HASH(`id`) BUCKETS 10
-> PROPERTIES (
-> "enable_unique_key_merge_on_write" = "true",
-> "replication_num" = "1"
-> );
Query OK, 0 rows affected (0.01 sec)
mysql [test]>desc db;
+-------+----------------+------+-------+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+----------------+------+-------+---------+-------+
| id | INT | No | true | NULL | |
| str | TEXT | Yes | false | NULL | NONE |
| dd | DECIMAL(15, 6) | Yes | false | NULL | NONE |
+-------+----------------+------+-------+---------+-------+
3 rows in set (0.00 sec)
mysql [test]>desc db all;
+-----------+---------------+-------+----------------+------------------+------+-------+---------+-------+---------+------------+-------------+
| IndexName | IndexKeysType | Field | Type | InternalType |
Null | Key | Default | Extra | Visible | DefineExpr | WhereClause |
+-----------+---------------+-------+----------------+------------------+------+-------+---------+-------+---------+------------+-------------+
| db | UNIQUE_KEYS | id | INT | INT | No
| true | NULL | | true | | |
| | | str | TEXT | TEXT |
Yes | false | NULL | NONE | true | | |
| | | dd | DECIMAL(15, 6) | DECIMALV3(15, 6) |
Yes | false | NULL | NONE | true | | |
+-----------+---------------+-------+----------------+------------------+------+-------+---------+-------+---------+------------+-------------+
3 rows in set (0.00 sec)
mysql [test]>show create table db;
| db | CREATE TABLE `db` (
`id` int(11) NOT NULL,
`str` text NULL,
`dd` DECIMAL(15, 6) NULL
) ENGINE=OLAP
UNIQUE KEY(`id`)
COMMENT 'OLAP'
DISTRIBUTED BY HASH(`id`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1",
"storage_format" = "V2",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false"
); |
```
<!--Describe your changes.-->
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]