Skip to content

Commit

Permalink
[improve](dynamic-table) change addColumns RPC interface fields fro…
Browse files Browse the repository at this point in the history
…m `required` to `optional` and and config doc
  • Loading branch information
eldenmoon committed Feb 11, 2023
1 parent aba843b commit c5b1c84
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
5 changes: 5 additions & 0 deletions docs/en/docs/admin-manual/config/be-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1410,4 +1410,9 @@ Indicates how many tablets failed to load in the data directory. At the same tim
* Description: Default dirs to put jdbc drivers.
* Default value: `${DORIS_HOME}/jdbc_drivers`
#### `enable_parse_multi_dimession_array`
* Description: Whether parse multidimensional array, if false encountering will return ERROR
* Default value: true
</version>
5 changes: 5 additions & 0 deletions docs/zh-CN/docs/admin-manual/config/be-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1428,4 +1428,9 @@ load tablets from header failed, failed tablets size: xxx, path=xxx
* 描述: 存放 jdbc driver 的默认目录。
* 默认值: `${DORIS_HOME}/jdbc_drivers`

#### `enable_parse_multi_dimession_array`

* 描述: 在动态表中是否解析多维数组,如果是false遇到多维数组则会报错。
* 默认值: true

</version>
Original file line number Diff line number Diff line change
Expand Up @@ -255,8 +255,8 @@ public TAddColumnsResult addColumns(TAddColumnsRequest request) throws TExceptio
if (!env.isMaster()) {
status.setStatusCode(TStatusCode.ILLEGAL_STATE);
status.addToErrorMsgs("retry rpc request to master.");
TAddColumnsResult result = new TAddColumnsResult(status, request.getTableId(), allColumns, 0);
LOG.debug("result: {}", result);
TAddColumnsResult result = new TAddColumnsResult();
result.setStatus(status);
return result;
}
TableName tableName = new TableName("", request.getDbName(), request.getTableName());
Expand Down Expand Up @@ -378,7 +378,11 @@ public int getAsInt() {
status.addToErrorMsgs(e.getMessage());
}

TAddColumnsResult result = new TAddColumnsResult(status, request.getTableId(), allColumns, schemaVersion);
TAddColumnsResult result = new TAddColumnsResult();
result.setStatus(status);
result.setTableId(request.getTableId());
result.setAllColumns(allColumns);
result.setSchemaVersion(schemaVersion);
LOG.debug("result: {}", result);
return result;
}
Expand Down
12 changes: 6 additions & 6 deletions gensrc/thrift/FrontendService.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -719,19 +719,19 @@ struct TFetchSchemaTableDataResult {

// Only support base table add columns
struct TAddColumnsRequest {
1: required i64 table_id
2: required list<TColumnDef> addColumns
1: optional i64 table_id
2: optional list<TColumnDef> addColumns
3: optional string table_name
4: optional string db_name
5: optional bool allow_type_conflict
}

// Only support base table add columns
struct TAddColumnsResult {
1: required Status.TStatus status
2: required i64 table_id
3: required list<Descriptors.TColumn> allColumns
4: required i32 schema_version
1: optional Status.TStatus status
2: optional i64 table_id
3: optional list<Descriptors.TColumn> allColumns
4: optional i32 schema_version
}

service FrontendService {
Expand Down

0 comments on commit c5b1c84

Please sign in to comment.