starocean999 commented on code in PR #49297: URL: https://github.com/apache/doris/pull/49297#discussion_r2038929182
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/CreateMaterializedViewCommand.java: ########## @@ -331,6 +328,9 @@ public Plan visitLogicalAggregate(LogicalAggregate<? extends Plan> aggregate, Va int groupByExprCount = aggregate.getGroupByExpressions().size(); context.groupByExprs = Maps.newHashMap(); for (int i = 0; i < groupByExprCount; ++i) { + if (outputs.get(i).getDataType().isOnlyMetricType()) { + throw new AnalysisException(Type.OnlyMetricTypeErrorMsg); + } Review Comment: these isOnlyMetricType are borrowed from CheckAfterRewrite rule. There are regression cases for group by and order by -- 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. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org 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