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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2e27827  [doc] Added http interface return example to obtain the 
specified table structure information (#7955)
2e27827 is described below

commit 2e27827c730fb861ec8ee76b6c8988f6271765f7
Author: smallhibiscus <[email protected]>
AuthorDate: Thu Feb 10 15:07:28 2022 +0800

    [doc] Added http interface return example to obtain the specified table 
structure information (#7955)
    
    1. Added http interface return example in table-schema-action.md.
    2. Correct typos in the document in error.md.
    3. Modify the content of the code comments in the text_converter.hpp file.
---
 be/src/exec/text_converter.hpp                     |  2 +-
 .../http-actions/fe/table-schema-action.md         | 57 ++++++++++++++++++++--
 .../http-actions/fe/table-schema-action.md         | 57 ++++++++++++++++++++--
 docs/zh-CN/faq/error.md                            |  2 +-
 4 files changed, 108 insertions(+), 10 deletions(-)

diff --git a/be/src/exec/text_converter.hpp b/be/src/exec/text_converter.hpp
index 44e807c..3b88534 100644
--- a/be/src/exec/text_converter.hpp
+++ b/be/src/exec/text_converter.hpp
@@ -41,7 +41,7 @@ namespace doris {
 inline bool TextConverter::write_slot(const SlotDescriptor* slot_desc, Tuple* 
tuple,
                                       const char* data, int len, bool 
copy_string, bool need_escape,
                                       MemPool* pool) {
-    //小批量导入只有\N被认为是NULL,没有批量导入的replace_value函数
+    //Small batch import only \N is considered to be NULL, there is no 
replace_value function for batch import
     if (true == slot_desc->is_nullable()) {
         if (len == 2 && data[0] == '\\' && data[1] == 'N') {
             tuple->set_null(slot_desc->null_indicator_offset());
diff --git a/docs/en/administrator-guide/http-actions/fe/table-schema-action.md 
b/docs/en/administrator-guide/http-actions/fe/table-schema-action.md
index e0a8337..d89de1b 100644
--- a/docs/en/administrator-guide/http-actions/fe/table-schema-action.md
+++ b/docs/en/administrator-guide/http-actions/fe/table-schema-action.md
@@ -53,7 +53,7 @@ None
 None
 
 ## Response
-
+* The http interface returns as follows:
 ```
 {
        "msg": "success",
@@ -76,10 +76,59 @@ None
        "count": 0
 }
 ```
-    
+* The http v2 interface returns as follows:
+```
+{
+       "msg": "success",
+       "code": 0,
+       "data": {
+               "properties": [{
+                       "type": "INT",
+                       "name": "k1",
+                       "comment": ""
+               }, {
+                       "type": "INT",
+                       "name": "k2",
+                       "comment": ""
+               }],
+               "keysType":UNIQUE_KEYS,
+               "status": 200
+       },
+       "count": 0
+}
+```
+Note: The difference is that the `http` method returns more `aggregation_type` 
fields than the `http v2` method. The `http v2` is enabled by setting 
`enable_http_server_v2`. For detailed parameter descriptions, see [fe parameter 
settings](https://doris.apache.org/administrator-guide/config/fe_config.html)
+
 ## Examples
 
-1. Get the table structure information of the specified table.
+1. Get the table structure information of the specified table via http 
interface.
+
+    ```
+    GET /api/db1/tbl1/_schema
+    
+    Response:
+    {
+       "msg": "success",
+       "code": 0,
+       "data": {
+               "properties": [{
+                       "type": "INT",
+                       "name": "k1",
+                       "comment": "",
+                       "aggregation_type":""
+               }, {
+                       "type": "INT",
+                       "name": "k2",
+                       "comment": "",
+                       "aggregation_type":"MAX"
+               }],
+               "keysType":UNIQUE_KEYS,
+               "status": 200
+       },
+       "count": 0
+    }
+    ```
+2. Get the table structure information of the specified table via http v2 
interface.
 
     ```
     GET /api/db1/tbl1/_schema
@@ -103,4 +152,4 @@ None
        },
        "count": 0
     }
-    ```
+    ```
\ No newline at end of file
diff --git 
a/docs/zh-CN/administrator-guide/http-actions/fe/table-schema-action.md 
b/docs/zh-CN/administrator-guide/http-actions/fe/table-schema-action.md
index c978c6b..0d3ee70 100644
--- a/docs/zh-CN/administrator-guide/http-actions/fe/table-schema-action.md
+++ b/docs/zh-CN/administrator-guide/http-actions/fe/table-schema-action.md
@@ -53,7 +53,7 @@ under the License.
 无
 
 ## Response
-
+* http接口返回如下:
 ```
 {
        "msg": "success",
@@ -76,10 +76,59 @@ under the License.
        "count": 0
 }
 ```
-    
+* http v2接口返回如下:
+```
+{
+       "msg": "success",
+       "code": 0,
+       "data": {
+               "properties": [{
+                       "type": "INT",
+                       "name": "k1",
+                       "comment": ""
+               }, {
+                       "type": "INT",
+                       "name": "k2",
+                       "comment": ""
+               }],
+               "keysType":UNIQUE_KEYS,
+               "status": 200
+       },
+       "count": 0
+}
+```
+注意:区别为`http`方式比`http v2`方式多返回`aggregation_type`字段,`http 
v2`开启是通过`enable_http_server_v2`进行设置,具体参数说明详见[fe参数设置](https://doris.apache.org/zh-CN/administrator-guide/config/fe_config.html)
+
 ## Examples
 
-1. 获取指定表的表结构信息。
+1. 通过http获取指定表的表结构信息。
+
+    ```
+    GET /api/db1/tbl1/_schema
+    
+    Response:
+    {
+       "msg": "success",
+       "code": 0,
+       "data": {
+               "properties": [{
+                       "type": "INT",
+                       "name": "k1",
+                       "comment": "",
+                       "aggregation_type":""
+               }, {
+                       "type": "INT",
+                       "name": "k2",
+                       "comment": "",
+                       "aggregation_type":"MAX"
+               }],
+               "keysType":UNIQUE_KEYS,
+               "status": 200
+       },
+       "count": 0
+    }
+    ```
+2. 通过http v2获取指定表的表结构信息。
 
     ```
     GET /api/db1/tbl1/_schema
@@ -103,4 +152,4 @@ under the License.
        },
        "count": 0
     }
-    ```
+    ```  
diff --git a/docs/zh-CN/faq/error.md b/docs/zh-CN/faq/error.md
index 705e952..fea200c 100644
--- a/docs/zh-CN/faq/error.md
+++ b/docs/zh-CN/faq/error.md
@@ -127,7 +127,7 @@ failed to initialize storage reader. 
tablet=63416.1050661139.aa4d304e7a7aff9c-f0
 
 在导入或者查询时,我们可能遇到这个错误。如果你去对应的 BE 日志中查看,也可能会找到类似错误。
 
-这是一个 RPC 错误,通常由两种可能:1. 对应的 BE 节点宕机。2. rpc 拥塞或其他错误。
+这是一个 RPC 错误,通常有两种可能:1. 对应的 BE 节点宕机。2. rpc 拥塞或其他错误。
 
 如果是 BE 节点宕机,则需要查看具体的宕机原因。这里只讨论 rpc 拥塞的问题。
 

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

Reply via email to