[BatchDelete] Add a configuration indicating whether to enable the batch delete function (#4493)
This commit is contained in:
@ -277,6 +277,9 @@ This configuration can play a role in certain scenarios. Assume that the initial
|
||||
|
||||
### `enable_auth_check`
|
||||
|
||||
### `enable_batch_delete_by_default`
|
||||
Whether to add a delete sign column when create unique table
|
||||
|
||||
### `enable_deploy_manager`
|
||||
|
||||
### `enable_insert_strict`
|
||||
|
||||
@ -275,6 +275,9 @@ FE 的配置项有两种方式进行配置:
|
||||
|
||||
### `enable_auth_check`
|
||||
|
||||
### `enable_batch_delete_by_default`
|
||||
在创建 unique 表时是否自动启用批量删除功能
|
||||
|
||||
### `enable_deploy_manager`
|
||||
|
||||
### `enable_insert_strict`
|
||||
|
||||
@ -336,7 +336,9 @@ public class CreateTableStmt extends DdlStmt {
|
||||
ErrorReport.reportAnalysisException(ErrorCode.ERR_TABLE_MUST_HAVE_COLUMNS);
|
||||
}
|
||||
// add a hidden column as delete flag for unique table
|
||||
if (keysDesc != null && keysDesc.getKeysType() == KeysType.UNIQUE_KEYS) {
|
||||
if (Config.enable_batch_delete_by_default
|
||||
&& keysDesc != null
|
||||
&& keysDesc.getKeysType() == KeysType.UNIQUE_KEYS) {
|
||||
columnDefs.add(ColumnDef.newDeleteSignColumnDef(AggregateType.REPLACE));
|
||||
}
|
||||
int rowLengthBytes = 0;
|
||||
@ -350,7 +352,6 @@ public class CreateTableStmt extends DdlStmt {
|
||||
hasHll = true;
|
||||
}
|
||||
|
||||
|
||||
if (columnDef.getAggregateType() == AggregateType.BITMAP_UNION) {
|
||||
hasBitmap = columnDef.getType().isBitmapType();
|
||||
}
|
||||
|
||||
@ -1238,4 +1238,10 @@ public class Config extends ConfigBase {
|
||||
*/
|
||||
@ConfField(mutable = true, masterOnly = true)
|
||||
public static boolean recover_with_empty_tablet = false;
|
||||
|
||||
/**
|
||||
* Whether to add a delete sign column when create unique table
|
||||
*/
|
||||
@ConfField(mutable = true, masterOnly = true)
|
||||
public static boolean enable_batch_delete_by_default = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user