[Fix](Variant) forbit create variant as key #36555 (#36578)

This commit is contained in:
lihangyu
2024-06-20 20:33:48 +08:00
committed by GitHub
parent a79b56ac23
commit c28c243c98
2 changed files with 40 additions and 17 deletions

View File

@ -226,6 +226,9 @@ public class ColumnDefinition {
} else if (type.isJsonType()) {
throw new AnalysisException(
"JsonType type should not be used in key column[" + getName() + "].");
} else if (type.isVariantType()) {
throw new AnalysisException(
"Variant type should not be used in key column[" + getName() + "].");
} else if (type.isMapType()) {
throw new AnalysisException("Map can only be used in the non-key column of"
+ " the duplicate table at present.");