Eng 6695 partial agg for ordered subquery

This findScanCandidate function is not helping much. So it finds the SEQSCAN or INDEXSCAN by following the first child of each node. You could do that in a loop here and when you found the SEQSCAN or INDEXSCAN you would not have to test again to know which of the two methods to use to set the displayOrderedColumns.