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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/StatementContext.java:
##########
@@ -141,6 +146,9 @@ public class StatementContext implements Closeable {
     // and value is the new string used for replacement.
     private final TreeMap<Pair<Integer, Integer>, String> indexInSqlToString
             = new TreeMap<>(new Pair.PairComparator<>());
+    // Record table id mapping, the key is the hash code of union catalogId, 
databaseId, tableId
+    // the value is the auto-increment id in the cascades context
+    private final Map<TableIdentifier, Integer> tableIdMapping = new 
LinkedHashMap<>();

Review Comment:
   ```suggestion
       private final Map<TableIdentifier, TableId> tableIdMapping = new 
LinkedHashMap<>();
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/mapping/RelationMapping.java:
##########
@@ -142,7 +143,7 @@ public static RelationMapping 
merge(List<BiMap<MappedRelation, MappedRelation>>
     }
 
     private static Long getTableQualifier(TableIf tableIf) {
-        return tableIf.getId();
+        return (long) new TableIdentifier(tableIf).hashCode();

Review Comment:
   use TableIdentifier directly



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/MaterializationContext.java:
##########
@@ -78,7 +78,7 @@ public abstract class MaterializationContext {
     // Mark enable record failure detail info or not, because record failure 
detail info is performance-depleting
     protected final boolean enableRecordFailureDetail;
     // The mv plan struct info
-    protected final StructInfo structInfo;
+    protected StructInfo structInfo;

Review Comment:
   why remove final?



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/StructInfo.java:
##########
@@ -395,6 +402,7 @@ public Map<ExprId, Expression> 
getNamedExprIdAndExprMapping() {
     }
 
     public BitSet getTableBitSet() {
+

Review Comment:
   useless blank line



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