Updated compute_expected_query_results to handle writeblock output selections