mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
fix issue#975, fixed && and ||
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user