[Doc] Add type BOOLEAN when enter 'help create table' in mysql client (#6852)

some user do not know Doris support type boolean, they use TINYINT,
so i add type BOOLEAN when enter 'help create table' in mysql client.

currently, type BOOLEAN size is 1 byte, but the value of boolean column only in {0,1} ,
which waste some memory, and i want change it's implement to 1 bit in the future.
This commit is contained in:
zhoubintao
2021-10-17 22:54:12 +08:00
committed by GitHub
parent bc069eac8b
commit bb2b29c64f
2 changed files with 12 additions and 6 deletions

View File

@ -52,6 +52,8 @@ Syntax:
col_name: Name of column
col_type: Type of column
```
BOOLEAN(1 Byte)
Range: {0,1}
TINYINT(1 Byte)
Range: -2^7 + 1 ~ 2^7 - 1
SMALLINT(2 Bytes)
@ -338,13 +340,14 @@ Syntax:
```
CREATE TABLE example_db.table_hash
(
k1 TINYINT,
k2 DECIMAL(10, 2) DEFAULT "10.5",
k1 BOOLEAN,
k2 TINYINT,
k3 DECIMAL(10, 2) DEFAULT "10.5",
v1 CHAR(10) REPLACE,
v2 INT SUM
)
ENGINE=olap
AGGREGATE KEY(k1, k2)
AGGREGATE KEY(k1, k2, k3)
COMMENT "my first doris table"
DISTRIBUTED BY HASH(k1) BUCKETS 32;
```

View File

@ -54,6 +54,8 @@ under the License.
col_type:列类型
```
BOOLEAN(1字节)
范围:{0,1}
TINYINT(1字节)
范围:-2^7 + 1 ~ 2^7 - 1
SMALLINT(2字节)
@ -370,13 +372,14 @@ under the License.
```
CREATE TABLE example_db.table_hash
(
k1 TINYINT,
k2 DECIMAL(10, 2) DEFAULT "10.5",
k1 BOOLEAN,
k2 TINYINT,
k3 DECIMAL(10, 2) DEFAULT "10.5",
v1 CHAR(10) REPLACE,
v2 INT SUM
)
ENGINE=olap
AGGREGATE KEY(k1, k2)
AGGREGATE KEY(k1, k2, k3)
COMMENT "my first doris table"
DISTRIBUTED BY HASH(k1) BUCKETS 32;
```