public static boolean isLiteralExpr(SQLExpr expr) { if (expr instanceof SQLLiteralExpr) { return true; } if (expr instanceof SQLBinaryOpExpr) { SQLBinaryOpExpr binary = (SQLBinaryOpExpr) expr; return isLiteralExpr(binary.left) && isLiteralExpr(binary.right); } return false; } }
if (x.left instanceof SQLBinaryOpExpr) { SQLBinaryOpExpr leftBinaryExpr = (SQLBinaryOpExpr) x.left; if (SQLExprUtils.equals(leftBinaryExpr.right, rightBinary)) { x = leftBinaryExpr; v.incrementReplaceCunt(); if (SQLExprUtils.isLiteralExpr(leftBinary.left) // && leftBinary.operator == SQLBinaryOperator.BooleanOr) { if (mergeEqual(leftBinary.right, x.right)) {
if (x.left instanceof SQLBinaryOpExpr) { SQLBinaryOpExpr leftBinaryExpr = (SQLBinaryOpExpr) x.left; if (SQLExprUtils.equals(leftBinaryExpr.right, rightBinary)) { x = leftBinaryExpr; v.incrementReplaceCunt(); if (SQLExprUtils.isLiteralExpr(leftBinary.left) // && leftBinary.operator == SQLBinaryOperator.BooleanOr) { if (mergeEqual(leftBinary.right, x.right)) {
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SQLBinaryOpExpr)) { return false; } SQLBinaryOpExpr other = (SQLBinaryOpExpr) obj; return operator == other.operator && SQLExprUtils.equals(left, other.left) && SQLExprUtils.equals(right, other.right); }
public static boolean isLiteralExpr(SQLExpr expr) { if (expr instanceof SQLLiteralExpr) { return true; } if (expr instanceof SQLBinaryOpExpr) { SQLBinaryOpExpr binary = (SQLBinaryOpExpr) expr; return isLiteralExpr(binary.left) && isLiteralExpr(binary.right); } return false; } }
if (original.getParent() instanceof SQLBinaryOpExpr) { SQLExpr other = ((SQLBinaryOpExpr) original.getParent()).other(original); if (!SQLExprUtils.isLiteralExpr(other)) { break;
firstOp = binaryItem.getOperator(); } else { if (!SQLExprUtils.equals(firstLeft, left)) { firstLeft = null; break;
if (original.getParent() instanceof SQLBinaryOpExpr) { SQLExpr other = ((SQLBinaryOpExpr) original.getParent()).other(original); if (!SQLExprUtils.isLiteralExpr(other)) { break;
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof SQLBinaryOpExpr)) { return false; } SQLBinaryOpExpr other = (SQLBinaryOpExpr) obj; return operator == other.operator && SQLExprUtils.equals(left, other.left) && SQLExprUtils.equals(right, other.right); }
firstOp = binaryItem.getOperator(); } else { if (!SQLExprUtils.equals(firstLeft, left)) { firstLeft = null; break;