transformationQuery.getSelect().setDistinct(false);
baseQuery.getSelect().setDistinct(true);
}
String inlineViewName = planEnv.getAliasName(newGroup);
transformationQuery = QueryUtil.wrapQuery(new SubqueryFromClause(inlineViewName, transformationQuery), inlineViewName);
// Now that we have the modified Query Node for the group name
// we need to update the metadata.
QueryNode relationalNode = new QueryNode(SQLStringVisitor.getSQLString(transformationQuery));
planEnv.addQueryNodeToMetadata(newGroupSymbol.getMetadataID(), relationalNode);