fix issue#975, fixed && and ||

This commit is contained in:
zhujunxxxxx
2015-10-20 19:29:32 +08:00
parent b2ecc62299
commit 9a925d49fc
2 changed files with 34 additions and 0 deletions
@@ -1049,6 +1049,20 @@ public class SQLEvalVisitorUtils {
x.putAttribute(EVAL_VALUE, result);
break;
}
case BooleanAnd:
{
boolean first = eq(leftValue, true);
boolean second = eq(rightValue, true);
x.putAttribute(EVAL_VALUE, first&&second);
break;
}
case BooleanOr:
{
boolean first = eq(leftValue, true);
boolean second = eq(rightValue, true);
x.putAttribute(EVAL_VALUE, first||second);
break;
}
default:
break;
}