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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java:
##########
@@ -531,6 +537,29 @@ private LogicalJoin<Plan, Plan> 
bindJoin(MatchingContext<LogicalJoin<Plan, Plan>
                 join.children(), null);
     }
 
+    private void checkConflictAlias(Plan plan) {
+        Set<String> existsTableNames = Sets.newLinkedHashSet();
+        Consumer<String> checkAlias = tableAliasName -> {
+            if (!existsTableNames.add(tableAliasName)) {
+                throw new AnalysisException("Not unique table/alias: '" + 
tableAliasName + "'");
+            }

Review Comment:
   conflict check should check qualified name



##########
regression-test/suites/query_p0/cross_db/cross_db.groovy:
##########
@@ -54,7 +54,7 @@ suite("cross_db") {
         (4, 40)
     """
 
-    sql """SELECT * FROM cross_db_1.cnt_table,cross_db_2.cnt_table"""
+    sql """SELECT * FROM cross_db_1.cnt_table as x,cross_db_2.cnt_table as y"""

Review Comment:
   why change this case? `SELECT * FROM 
cross_db_1.cnt_table,cross_db_2.cnt_table` should not throw exception



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