PIM-3475 : ensure that the query is well built in specs