test for value casting for queries