add logic of add/delete metrics in qbe-query