Adding result sets to the query writer