Fix bug: compare column with equals rather than == (#1850)
This commit is contained in:
@ -1032,19 +1032,6 @@ public class Analyzer {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -102,6 +102,19 @@ public class TupleDescriptor {
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1261,7 +1261,7 @@ public class SingleNodePlanner {
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user