[improvement] add switch of quantile_state column (#8706)

Add switch for quantile_state column, default false.
This commit is contained in:
spaces-x
2022-03-31 22:59:27 +08:00
committed by GitHub
parent 2c774f5c79
commit 6729d41c93
2 changed files with 14 additions and 0 deletions

View File

@ -23,6 +23,7 @@ import org.apache.doris.catalog.PrimitiveType;
import org.apache.doris.catalog.ScalarType;
import org.apache.doris.catalog.Type;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.Config;
import org.apache.doris.common.FeNameFormat;
import com.google.common.base.Preconditions;
@ -165,6 +166,11 @@ public class ColumnDef {
Type type = typeDef.getType();
if(!Config.enable_quantile_state_type && type.isQuantileStateType()) {
throw new AnalysisException("quantile_state is disabled" +
"Set config 'enable_quantile_state_type' = 'true' to enable this column type.");
}
// disable Bitmap Hll type in keys, values without aggregate function.
if (type.isBitmapType() || type.isHllType()) {
if (isKey) {

View File

@ -1650,4 +1650,12 @@ public class Config extends ConfigBase {
*/
@ConfField(mutable = true)
public static boolean skip_compaction_slower_replica = true;
/**
* Enable quantile_state type column
* Default is false.
* */
@ConfField(mutable = true, masterOnly = true)
public static boolean enable_quantile_state_type = false;
}