Rewrite BETWEEN at parse time using relational operations