This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch temp_quailifier
in repository https://gitbox.apache.org/repos/asf/doris.git

commit decde9f5441ab39b606ace53cca7e77dbad3af8e
Author: morrySnow <[email protected]>
AuthorDate: Wed Aug 27 11:12:10 2025 +0800

    branch-3.1: [fix](temp_table) could not query temp table's column with 
qualifier #55312
    
    picked from #55312
    
    should remove temp table prefix when generate slot reference from column
---
 fe/.idea/vcs.xml                                     | 20 +++-----------------
 .../trees/plans/logical/LogicalCatalogRelation.java  |  5 +++--
 .../suites/temp_table_p0/test_temp_table.groovy      |  2 +-
 3 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/fe/.idea/vcs.xml b/fe/.idea/vcs.xml
index dc3fa65f524..8c0f59e92e6 100644
--- a/fe/.idea/vcs.xml
+++ b/fe/.idea/vcs.xml
@@ -1,20 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-   Licensed to the Apache Software Foundation (ASF) under one or more
-   contributor license agreements.  See the NOTICE file distributed with
-   this work for additional information regarding copyright ownership.
-   The ASF licenses this file to You under the Apache License, Version 2.0
-   (the "License"); you may not use this file except in compliance with
-   the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
-  -->
 <project version="4">
   <component name="IssueNavigationConfiguration">
     <option name="links">
@@ -27,6 +11,8 @@
     </option>
   </component>
   <component name="VcsDirectoryMappings">
-      <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/../be/src/apache-orc" vcs="Git" />
+    <mapping directory="$PROJECT_DIR$/../be/src/clucene" vcs="Git" />
   </component>
 </project>
\ No newline at end of file
diff --git 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java
 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java
index d3b65aa6015..fe29ab9b4cf 100644
--- 
a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java
+++ 
b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalCatalogRelation.java
@@ -23,6 +23,7 @@ import org.apache.doris.catalog.Env;
 import org.apache.doris.catalog.TableIf;
 import org.apache.doris.catalog.constraint.PrimaryKeyConstraint;
 import org.apache.doris.catalog.constraint.UniqueConstraint;
+import org.apache.doris.common.util.Util;
 import org.apache.doris.datasource.CatalogIf;
 import org.apache.doris.nereids.exceptions.AnalysisException;
 import org.apache.doris.nereids.memo.GroupExpression;
@@ -114,14 +115,14 @@ public abstract class LogicalCatalogRelation extends 
LogicalRelation implements
      * Full qualified name parts, i.e., concat qualifier and name into a list.
      */
     public List<String> qualified() {
-        return Utils.qualifiedNameParts(qualifier, table.getName());
+        return Utils.qualifiedNameParts(qualifier, 
Util.getTempTableDisplayName(table.getName()));
     }
 
     /**
      * Full qualified table name, concat qualifier and name with `.` as 
separator.
      */
     public String qualifiedName() {
-        return Utils.qualifiedName(qualifier, table.getName());
+        return Utils.qualifiedName(qualifier, 
Util.getTempTableDisplayName(table.getName()));
     }
 
     @Override
diff --git a/regression-test/suites/temp_table_p0/test_temp_table.groovy 
b/regression-test/suites/temp_table_p0/test_temp_table.groovy
index 8501db308e5..fe6699c3cf0 100644
--- a/regression-test/suites/temp_table_p0/test_temp_table.groovy
+++ b/regression-test/suites/temp_table_p0/test_temp_table.groovy
@@ -138,7 +138,7 @@ suite('test_temp_table', 'p0') {
     sql "begin"
     sql "insert into t_test_temp_table2 values 
(4,\"2018-06-15\",\"David\"),(5,\"2018-07-12\",\"Elliott\")"
     sql "rollback"
-    def select_result11 = sql "select * from t_test_temp_table2"
+    def select_result11 = sql "select t_test_temp_table2.id from 
t_test_temp_table2"
     assertEquals(select_result11.size(), 0)
 
     sql "begin"


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

Reply via email to