[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:
amory
2024-08-02 11:18:33 +08:00
committed by GitHub
parent 327069fdbc
commit 84d9b2fcf4
4 changed files with 377 additions and 3 deletions

View File

@ -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());

View File

@ -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);
}