From f70dfe27d0d63b8ced2a8b539f217b2bfa808a84 Mon Sep 17 00:00:00 2001 From: morrySnow <101034200+morrySnow@users.noreply.github.com> Date: Mon, 30 Oct 2023 19:26:09 +0800 Subject: [PATCH] [fix](Nereids) init comment as null when create struct field from catalog type (#26105) --- .../src/main/java/org/apache/doris/nereids/types/DataType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java index c939786237..8f88732621 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/types/DataType.java @@ -350,7 +350,7 @@ public abstract class DataType { } else if (type.isStructType()) { List 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()) {