Added pre-condition to get_query_result_set()