morrySnow commented on code in PR #48887:
URL: https://github.com/apache/doris/pull/48887#discussion_r2003170548


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java:
##########
@@ -192,17 +196,24 @@ private static List<Pair<MappedRelation[], 
MappedRelation[]>> getUniquePermutati
     }
 
     private static void backtrack(MappedRelation[] left, MappedRelation[] 
right, int index,
-            boolean[] used, MappedRelation[] current, 
List<Pair<MappedRelation[], MappedRelation[]>> results) {
+            boolean[] used, MappedRelation[] current, 
List<Pair<MappedRelation[], MappedRelation[]>> results,
+            int maxMappingCount) {
+        if (results.size() >= maxMappingCount) {
+            LOG.warn(String.format("queryToViewTableMappings is over limit and 
be intercepted, "
+                            + "results size is %s,\n MappedRelation left is 
%s,\n MappedRelation right is %s \n",
+                    results.size(), Arrays.toString(left), 
Arrays.toString(right)));

Review Comment:
   do not use String.format use log place holder instead. do not use `\n` in 
log normally, because it is not friendly for auto log analysis
   ```suggestion
               LOG.warn("queryToViewTableMappings is over limit and be 
intercepted, "
                               + "results size is {}, MappedRelation left is 
{}, MappedRelation right is {}",
                       results.size(), left, right);
   ```



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