wutiangan commented on a change in pull request #4014: URL: https://github.com/apache/incubator-doris/pull/4014#discussion_r451257912
########## File path: fe/src/main/java/org/apache/doris/analysis/CreateMaterializedViewStmt.java ########## @@ -50,7 +53,21 @@ * [PROPERTIES ("key" = "value")] */ public class CreateMaterializedViewStmt extends DdlStmt { - public static final String MATERIALIZED_VIEW_NAME_PRFIX = "__doris_materialized_view_"; + public static final String MATERIALIZED_VIEW_NAME_PREFIX = "mv_"; + public static final Map<String, MVColumnPattern> FN_NAME_TO_PATTERN; + + static { + FN_NAME_TO_PATTERN = Maps.newHashMap(); + FN_NAME_TO_PATTERN.put(AggregateType.SUM.name().toLowerCase(), + new MVColumnOneChildPattern(AggregateType.SUM.name().toLowerCase())); + FN_NAME_TO_PATTERN.put(AggregateType.MIN.name().toLowerCase(), + new MVColumnOneChildPattern(AggregateType.MIN.name().toLowerCase())); + FN_NAME_TO_PATTERN.put(AggregateType.MAX.name().toLowerCase(), + new MVColumnOneChildPattern(AggregateType.MAX.name().toLowerCase())); + FN_NAME_TO_PATTERN.put("count", new MVColumnOneChildPattern("count")); + FN_NAME_TO_PATTERN.put("bitmap_union", new MVColumnBitmapUnionPattern()); + FN_NAME_TO_PATTERN.put("hll_union", new MVColumnHLLUnionPattern()); + } Review comment: Can you add comment which pattern is suitable for AggregateModel, which pattern is suitable for DuplicatedModel? if it is a need to add a type to distinguish the case. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org