add cast support in query option for primitive/enumeration types