Eng 6591 partial aggregate

The test for the subquery case could not be much easier -- "if (root.isSubQuery()) {".
Please eliminate that case BEFORE you consult the catalog to look up the target table name.
Maybe that is and will ALWAYS be a perfectly safe thing to do with a subquery seqscan, but it will ALWAYS make me very nervous whenever I see it.