//create SortColInfo from the project
if(project.isProjectStar()){
//there is no input schema, that is why project-star is still here
// we don't know how many columns are represented by this
//so don't add further columns to sort list
return new SortInfo(sortColInfoList);
}
if(project.isRangeProject()){
if(project.getEndCol() < 0){
//stop here for
// same reason as project-star condition above
//(unkown number of columns this represents)
return new SortInfo(sortColInfoList);
}
//expand the project-range into multiple SortColInfos
for(int cnum = project.getStartCol(); cnum < project.getEndCol(); cnum++){
sortColInfoList.add(
new SortColInfo(null, cnum, getOrder(mAscCols,i))
);
}
}
else{
int sortColIndex = project.getColNum();
String sortColName = (schema == null) ? null :
schema.getField(sortColIndex).alias;
sortColInfoList.add(
new SortColInfo(sortColName, sortColIndex, getOrder(mAscCols,i))
);
}
}
return new SortInfo(sortColInfoList);
}