This is an automated email from the ASF dual-hosted git repository.

morningman pushed a commit to branch branch-0.15
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git

commit 6c42fccbe0946878a4a0eb5fb2358d7d669ab4da
Author: zhoubintao <[email protected]>
AuthorDate: Sun Oct 17 22:54:12 2021 +0800

    [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.
---
 .../sql-reference/sql-statements/Data Definition/CREATE TABLE.md | 9 ++++++---
 .../sql-reference/sql-statements/Data Definition/CREATE TABLE.md | 9 ++++++---
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/docs/en/sql-reference/sql-statements/Data Definition/CREATE 
TABLE.md b/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md
index b8275a2..707f19d 100644
--- a/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md      
+++ b/docs/en/sql-reference/sql-statements/Data Definition/CREATE TABLE.md      
@@ -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;
     ```
diff --git a/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE 
TABLE.md b/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE 
TABLE.md
index 9623a5d..a99fd99 100644
--- a/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE TABLE.md   
+++ b/docs/zh-CN/sql-reference/sql-statements/Data Definition/CREATE TABLE.md   
@@ -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;
     ```

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to