@@ -13,41 +13,41 @@ public enum BinaryLogicalOperator implements Operator {
1313 AND {
1414 @ Override
1515 public PostgresConstant apply (PostgresConstant left , PostgresConstant right ) {
16- left = left .cast (PostgresDataType .BOOLEAN );
17- right = right .cast (PostgresDataType .BOOLEAN );
18- if (left .isNull ()) {
19- if (right .isNull ()) {
16+ PostgresConstant leftBool = left .cast (PostgresDataType .BOOLEAN );
17+ PostgresConstant rightBool = right .cast (PostgresDataType .BOOLEAN );
18+ if (leftBool .isNull ()) {
19+ if (rightBool .isNull ()) {
2020 return PostgresConstant .createNullConstant ();
2121 } else {
22- if (right .asBoolean ()) {
22+ if (rightBool .asBoolean ()) {
2323 return PostgresConstant .createNullConstant ();
2424 } else {
2525 return PostgresConstant .createFalse ();
2626 }
2727 }
28- } else if (!left .asBoolean ()) {
28+ } else if (!leftBool .asBoolean ()) {
2929 return PostgresConstant .createFalse ();
3030 }
31- assert left .asBoolean ();
32- if (right .isNull ()) {
31+ assert leftBool .asBoolean ();
32+ if (rightBool .isNull ()) {
3333 return PostgresConstant .createNullConstant ();
3434 } else {
35- return PostgresConstant .createBooleanConstant (right .isBoolean () && right .asBoolean ());
35+ return PostgresConstant .createBooleanConstant (rightBool .isBoolean () && rightBool .asBoolean ());
3636 }
3737 }
3838 },
3939 OR {
4040 @ Override
4141 public PostgresConstant apply (PostgresConstant left , PostgresConstant right ) {
42- left = left .cast (PostgresDataType .BOOLEAN );
43- right = right .cast (PostgresDataType .BOOLEAN );
44- if (left .isBoolean () && left .asBoolean ()) {
42+ PostgresConstant leftBool = left .cast (PostgresDataType .BOOLEAN );
43+ PostgresConstant rightBool = right .cast (PostgresDataType .BOOLEAN );
44+ if (leftBool .isBoolean () && leftBool .asBoolean ()) {
4545 return PostgresConstant .createTrue ();
4646 }
47- if (right .isBoolean () && right .asBoolean ()) {
47+ if (rightBool .isBoolean () && rightBool .asBoolean ()) {
4848 return PostgresConstant .createTrue ();
4949 }
50- if (left .isNull () || right .isNull ()) {
50+ if (leftBool .isNull () || rightBool .isNull ()) {
5151 return PostgresConstant .createNullConstant ();
5252 }
5353 return PostgresConstant .createFalse ();
0 commit comments