add interface IToMap, make RawPredicate and RawSubquery extend it