1. A computer-implemented method for rewriting a relational expression, the method comprising: determining, by a computing system processor, that a type of one or more of a relational operator and operands of a relational expression originated in a first type system; determining, by the processor, a sign of at least one of the operands; rewriting, by the processor, the relational expression based on the sign; and sending the rewritten relational expression by the processor for evaluation in a second type system.