Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions fe/src/main/java/org/apache/doris/analysis/SelectStmt.java
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,19 @@ public List<TupleId> getTableRefIds() {
return result;
}

public List<TupleId> getTableRefIdsWithoutInlineView() {
List<TupleId> result = Lists.newArrayList();

for (TableRef ref : fromClause_) {
if (ref instanceof InlineViewRef) {
continue;
}
result.add(ref.getId());
}

return result;
}

@Override
public List<TupleId> collectTupleIds() {
List<TupleId> result = Lists.newArrayList();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -474,8 +473,7 @@ private void init() {

// Step4: compute the output column
// ISSUE-3174: all of columns which belong to top tuple should be considered in selector.
ArrayList<TupleId> topTupleIds = Lists.newArrayList();
selectStmt.getMaterializedTupleIds(topTupleIds);
List<TupleId> topTupleIds = selectStmt.getTableRefIdsWithoutInlineView();
for (TupleId tupleId : topTupleIds) {
TupleDescriptor tupleDescriptor = analyzer.getTupleDesc(tupleId);
tupleDescriptor.getTableNameToColumnNames(columnNamesInQueryOutput);
Expand Down