morningman commented on code in PR #10246:
URL: https://github.com/apache/doris/pull/10246#discussion_r901452877


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/TablePattern.java:
##########
@@ -110,34 +160,27 @@ public boolean equals(Object obj) {
             return false;
         }
         TablePattern other = (TablePattern) obj;
-        return db.equals(other.getQualifiedDb()) && tbl.equals(other.getTbl());
+        return ctl.equals(other.getQualifiedCtl()) && 
db.equals(other.getQualifiedDb()) && tbl.equals(other.getTbl());
     }
 
     @Override
     public int hashCode() {
         int result = 17;
+        result = 31 * result + ctl.hashCode();
         result = 31 * result + db.hashCode();
         result = 31 * result + tbl.hashCode();
         return result;
     }
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder();
-        sb.append(db).append(".").append(tbl);
-        return sb.toString();
+        return String.format("%s.%s.%s", ctl, db, tbl);
     }
 
     @Override
     public void write(DataOutput out) throws IOException {
         Preconditions.checkState(isAnalyzed);
-        Text.writeString(out, db);
-        Text.writeString(out, tbl);
-    }
-
-    public void readFields(DataInput in) throws IOException {
-        db = Text.readString(in);
-        tbl = Text.readString(in);
-        isAnalyzed = true;
+        String json = GsonUtils.GSON.toJson(this);

Review Comment:
   Need to add version check



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