Refatoring QueryExecution specs