morrySnow commented on PR #57857:
URL: https://github.com/apache/doris/pull/57857#issuecomment-3525315650

   maybe we could fix it like this:
   ```diff
   diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java 
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
   index 4a810500db0..711775f7f1c 100644
   --- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
   +++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
   @@ -609,8 +609,11 @@ public class Database extends MetaObject implements 
Writable, DatabaseIf<Table>,
        public Table getTableNullable(String tableName) {
            if (Env.isStoredTableNamesLowerCase()) {
                tableName = tableName.toLowerCase();
   +
            }
   +        String tempTableName = Util.generateTempTableInnerName(tableName);
            if (Env.isTableNamesCaseInsensitive()) {
   +            tempTableName = 
lowerCaseToTableName.get(tempTableName.toLowerCase());
                tableName = lowerCaseToTableName.get(tableName.toLowerCase());
                if (tableName == null) {
                    return null;
   @@ -618,7 +621,7 @@ public class Database extends MetaObject implements 
Writable, DatabaseIf<Table>,
            }
    
            // return temp table first
   -        Table table = 
nameToTable.get(Util.generateTempTableInnerName(tableName));
   +        Table table = nameToTable.get(tempTableName);
            if (table == null) {
                table = nameToTable.get(tableName);
            }
   diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteUtil.java
 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteUtil.java
   index 0416da1b90c..6df50893e70 100644
   --- 
a/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteUtil.java
   +++ 
b/fe/fe-core/src/main/java/org/apache/doris/insertoverwrite/InsertOverwriteUtil.java
   @@ -52,9 +52,11 @@ public class InsertOverwriteUtil {
                                             List<String> tempPartitionNames) 
throws DdlException {
            if (tableIf instanceof OlapTable) {
                for (int i = 0; i < partitionNames.size(); i++) {
   -                Env.getCurrentEnv().addPartitionLike((Database) 
tableIf.getDatabase(), tableIf.getName(),
   +                Env.getCurrentEnv().addPartitionLike((Database) 
tableIf.getDatabase(),
   +                        ((OlapTable) tableIf).getDisplayName(),
                            new 
AddPartitionLikeClause(tempPartitionNames.get(i), partitionNames.get(i), true));
   -                LOG.info("successfully add temp partition [{}] for [{}]", 
tempPartitionNames.get(i), tableIf.getName());
   +                LOG.info("successfully add temp partition [{}] for [{}]",
   +                        tempPartitionNames.get(i), ((OlapTable) 
tableIf).getDisplayName());
                }
            }
        }
   ```


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