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: 0 additions & 13 deletions fe/src/main/java/org/apache/doris/analysis/Analyzer.java
Original file line number Diff line number Diff line change
Expand Up @@ -1032,19 +1032,6 @@ public boolean containsOuterJoinedTid(List<TupleId> tids) {
return false;
}

/**
* Return slot descriptor corresponding to column referenced in the context
* of tupleDesc, or null if no such reference exists.
*/
public SlotDescriptor getColumnSlot(TupleDescriptor tupleDesc, Column col) {
for (SlotDescriptor slotDesc : tupleDesc.getSlots()) {
if (slotDesc.getColumn() == col) {
return slotDesc;
}
}
return null;
}

public DescriptorTable getDescTbl() {
return globalState.descTbl;
}
Expand Down
13 changes: 13 additions & 0 deletions fe/src/main/java/org/apache/doris/analysis/TupleDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,19 @@ public ArrayList<SlotDescriptor> getMaterializedSlots() {
return result;
}

/**
* Return slot descriptor corresponding to column referenced in the context
* of tupleDesc, or null if no such reference exists.
*/
public SlotDescriptor getColumnSlot(String columnName) {
for (SlotDescriptor slotDesc : slots) {
if (slotDesc.getColumn() != null && slotDesc.getColumn().getName().equalsIgnoreCase(columnName)) {
return slotDesc;
}
}
return null;
}

public Table getTable() {
return table;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ private PlanNode createScanNode(Analyzer analyzer, TableRef tblRef)
Map<String, PartitionColumnFilter> columnFilters = Maps.newHashMap();
List<Expr> conjuncts = analyzer.getUnassignedConjuncts(scanNode);
for (Column column : tblRef.getTable().getBaseSchema()) {
SlotDescriptor slotDesc = analyzer.getColumnSlot(tblRef.getDesc(), column);
SlotDescriptor slotDesc = tblRef.getDesc().getColumnSlot(column.getName());
if (null == slotDesc) {
continue;
}
Expand Down