seawinde commented on code in PR #38367:
URL: https://github.com/apache/doris/pull/38367#discussion_r1696232960


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializedViewUtils.java:
##########
@@ -652,16 +658,17 @@ private static boolean checkPartition(Collection<? 
extends Expression> expressio
                     // mv time unit level is little then query
                     context.addFailReason("partition column time unit level 
should be "
                             + "greater than sql select column");
-                    return false;
+                    continue;
                 }
                 if (!partitionColumn.isColumnFromTable()) {
                     
context.setMvPartitionColumn(partitionColumns.iterator().next());
                 }
                 if (!context.getPartitionExpression().isPresent()) {
                     context.setPartitionExpression(partitionExpression);
                 }
+                return true;
             }
-            return true;
+            return false;

Review Comment:
   Maybe the code  `return context.getMvPartitionColumn().isColumnFromTable();` 
maybe better



-- 
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

Reply via email to