[enhancement](bitmap)support bitmap type for non-key column in duplicate table (#28392)

This commit is contained in:
bobhan1
2023-12-14 23:59:12 +08:00
committed by GitHub
parent 310d1ab9a9
commit 8ca7bd8f98
6 changed files with 144 additions and 19 deletions

View File

@ -524,12 +524,7 @@ public class CreateTableStmt extends DdlStmt {
}
if (columnDef.getType().isObjectStored()) {
if (columnDef.getType().isBitmapType()) {
if (keysDesc.getKeysType() == KeysType.DUP_KEYS) {
throw new AnalysisException("column:" + columnDef.getName()
+ " must be used in AGG_KEYS or UNIQUE_KEYS.");
}
} else {
if (!columnDef.getType().isBitmapType()) {
if (keysDesc.getKeysType() != KeysType.AGG_KEYS) {
throw new AnalysisException("column:" + columnDef.getName() + " must be used in AGG_KEYS.");
}

View File

@ -198,9 +198,6 @@ public class ColumnDefinition {
isNullable = false;
}
if (type.isBitmapType()) {
if (keysType == KeysType.DUP_KEYS) {
throw new AnalysisException("column:" + name + " must be used in AGG_KEYS or UNIQUE_KEYS.");
}
if (aggType != null) {
isNullable = false;
}
@ -354,12 +351,7 @@ public class ColumnDefinition {
}
if (type.isObjectType()) {
if (type.isBitmapType()) {
if (keysType == KeysType.DUP_KEYS) {
throw new AnalysisException(
"column:" + name + " must be used in AGG_KEYS or UNIQUE_KEYS.");
}
} else {
if (!type.isBitmapType()) {
if (keysType != KeysType.AGG_KEYS) {
throw new AnalysisException("column:" + name + " must be used in AGG_KEYS.");
}