[pick](nestedtypes) support nested type with agg replace_if_not_null (#38719)
## Proposed changes backport: https://github.com/apache/doris/pull/38304 Issue Number: close #xxx <!--Describe your changes.-->
This commit is contained in:
@ -479,7 +479,8 @@ public class CreateTableStmt extends DdlStmt {
|
||||
|
||||
if (columnDef.getType().isComplexType() && engineName.equalsIgnoreCase(DEFAULT_ENGINE_NAME)) {
|
||||
if (columnDef.getAggregateType() != null && columnDef.getAggregateType() != AggregateType.NONE
|
||||
&& columnDef.getAggregateType() != AggregateType.REPLACE) {
|
||||
&& columnDef.getAggregateType() != AggregateType.REPLACE
|
||||
&& columnDef.getAggregateType() != AggregateType.REPLACE_IF_NOT_NULL) {
|
||||
throw new AnalysisException(
|
||||
columnDef.getType().getPrimitiveType() + " column can't support aggregation "
|
||||
+ columnDef.getAggregateType());
|
||||
|
||||
@ -366,14 +366,16 @@ public class ColumnDefinition {
|
||||
} else {
|
||||
if (aggType != AggregateType.GENERIC
|
||||
&& aggType != AggregateType.NONE
|
||||
&& aggType != AggregateType.REPLACE) {
|
||||
&& aggType != AggregateType.REPLACE
|
||||
&& aggType != AggregateType.REPLACE_IF_NOT_NULL) {
|
||||
throw new AnalysisException(type.toCatalogDataType().getPrimitiveType()
|
||||
+ " column can't support aggregation " + aggType);
|
||||
}
|
||||
}
|
||||
isNullable = false;
|
||||
} else {
|
||||
if (aggType != null && aggType != AggregateType.NONE && aggType != AggregateType.REPLACE) {
|
||||
if (aggType != null && aggType != AggregateType.NONE && aggType != AggregateType.REPLACE
|
||||
&& aggType != AggregateType.REPLACE_IF_NOT_NULL) {
|
||||
throw new AnalysisException(type.toCatalogDataType().getPrimitiveType()
|
||||
+ " column can't support aggregation " + aggType);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user