924060929 commented on code in PR #38104:
URL: https://github.com/apache/doris/pull/38104#discussion_r1683728418
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/rules/analysis/BindExpression.java:
##########
@@ -507,6 +508,31 @@ private LogicalJoin<Plan, Plan>
bindJoin(MatchingContext<LogicalJoin<Plan, Plan>
LogicalJoin<Plan, Plan> join = ctx.root;
CascadesContext cascadesContext = ctx.cascadesContext;
+ Set<String> tableNames = new HashSet<>();
+ List<Plan> children = join.children();
+ for (Plan child : children) {
+ // get alias name
+ if (child instanceof LogicalSubQueryAlias) {
+ LogicalSubQueryAlias subQueryAlias = (LogicalSubQueryAlias)
child;
+ String alias = subQueryAlias.getAlias();
+
+ if (!tableNames.add(alias)) {
+ throw new AnalysisException("Not unique table/alias: '" +
alias + "'");
+ }
+ // get table name
+ } else if (child instanceof LogicalFilter) {
+ Plan grandChild = child.children().get(0);
+ if (grandChild instanceof LogicalOlapScan) {
Review Comment:
you should support other table type, for example, `LogicalFileScan` for hive
table, so `LogicalCatalogRelation` is more suitable
--
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]