Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion be/src/exec/text_converter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
57 changes: 53 additions & 4 deletions docs/en/administrator-guide/http-actions/fe/table-schema-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ None
None

## Response

* The http interface returns as follows:
```
{
"msg": "success",
Expand All @@ -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
Expand All @@ -103,4 +152,4 @@ None
},
"count": 0
}
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ under the License.

## Response

* http接口返回如下:
```
{
"msg": "success",
Expand All @@ -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
Expand All @@ -103,4 +152,4 @@ under the License.
},
"count": 0
}
```
```
2 changes: 1 addition & 1 deletion docs/zh-CN/faq/error.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 拥塞的问题。

Expand Down