[fix](Nereids) init comment as null when create struct field from catalog type (#26105)

This commit is contained in:
morrySnow
2023-10-30 19:26:09 +08:00
committed by GitHub
parent 0a4863e859
commit f70dfe27d0

View File

@ -350,7 +350,7 @@ public abstract class DataType {
} else if (type.isStructType()) {
List<StructField> structFields = ((org.apache.doris.catalog.StructType) (type)).getFields().stream()
.map(cf -> new StructField(cf.getName(), fromCatalogType(cf.getType()),
cf.getContainsNull(), cf.getComment()))
cf.getContainsNull(), cf.getComment() == null ? "" : cf.getComment()))
.collect(ImmutableList.toImmutableList());
return new StructType(structFields);
} else if (type.isMapType()) {