[Planner](fix)Fix unexpected index out of bound exception (#11819)

This commit is contained in:
Kikyou1997
2022-08-18 15:52:54 +08:00
committed by GitHub
parent 066bc7693e
commit b9dcb60172
3 changed files with 61 additions and 1 deletions

View File

@ -274,7 +274,7 @@ public class SortNode extends PlanNode {
@Override
public Set<SlotId> computeInputSlotIds(Analyzer analyzer) throws NotImplementedException {
List<SlotDescriptor> slotDescriptorList = this.info.getSortTupleDescriptor().getSlots();
for (int i = 0; i < slotDescriptorList.size(); i++) {
for (int i = slotDescriptorList.size() - 1; i >= 0; i--) {
if (!slotDescriptorList.get(i).isMaterialized()) {
resolvedTupleExprs.remove(i);
}