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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/ForeignKeyContext.java:
##########
@@ -102,10 +105,22 @@ public Void visitLogicalFilter(LogicalFilter<?> filter, 
ForeignKeyContext contex
     }
 
     void putAllForeignKeys(TableIf table) {
-        TableNameInfo tableNameInfo = TableNameInfo.createOrNull(table);
-        if (tableNameInfo == null) {
+        if (table == null || table.getName() == null || 
table.getName().isEmpty()) {
             return;
         }
+        DatabaseIf<?> db = table.getDatabase();
+        if (db == null) {
+            return;
+        }
+        CatalogIf<?> catalog = db.getCatalog();
+        if (catalog == null) {
+            return;
+        }
+        String tableName = table.getName();
+        if (GlobalVariable.isStoredTableNamesLowerCase()) {
+            tableName = tableName.toLowerCase();

Review Comment:
   Fixed — removed redundant lowercasing from both `putAllForeignKeys` and 
`putAllPrimaryKeys`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to