morningman commented on a change in pull request #6184: URL: https://github.com/apache/incubator-doris/pull/6184#discussion_r667637240
########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java ########## @@ -324,17 +324,22 @@ public void getTables(Analyzer analyzer, Map<Long, Table> tableMap, Set<String> } @Override - public void getTableRefs(List<TableRef> tblRefs, Set<String> parentViewNameSet) { - getWithClauseTableRefs(tblRefs, parentViewNameSet); + public void getTableRefs(Analyzer analyzer, List<TableRef> tblRefs, Set<String> parentViewNameSet) { + getWithClauseTableRefs(analyzer, tblRefs, parentViewNameSet); for (TableRef tblRef : fromClause_) { - if (tblRef instanceof InlineViewRef) { - QueryStmt inlineStmt = ((InlineViewRef) tblRef).getViewStmt(); - inlineStmt.getTableRefs(tblRefs, parentViewNameSet); - } else { - if (isViewTableRef(tblRef.getName().toString(), parentViewNameSet)) { - continue; + try { + tblRef = analyzer.resolveTableRef(tblRef); Review comment: Better using a local variable to save the return value like: ``` TableRef tmpTblRef = analyzer.resolveTableRef(tblRef); ``` ########## File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ShowViewStmt.java ########## @@ -114,20 +114,20 @@ public void analyze(Analyzer analyzer) throws AnalysisException, UserException { View view = (View) table; List<TableRef> tblRefs = Lists.newArrayList(); // get table refs instead of get tables because it don't need to check table's validity - getTableRefs(view, tblRefs); + getTableRefs(analyzer, view, tblRefs); for (TableRef tblRef : tblRefs) { - tblRef.analyze(analyzer); + tblRef.getName().analyze(analyzer); Review comment: Why not just call `tblRef.analyze(analyzer);`? -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org