TInstance common = TypeResolver.commonInstance(
castResolver, leftExpr.resultType(), rightExpr.resultType());
leftExpr = castTo(leftExpr, common, castResolver);
rightExpr = castTo(rightExpr, common, castResolver);
return new TComparisonExpression(leftExpr, comparison, rightExpr);
}
private TPreparedExpression castTo(TPreparedExpression expression, TInstance target, TCastResolver casts) {
TClass inputTClass = expression.resultType().typeClass();
TClass targetTClass = target.typeClass();