(final Simplify mode, final CompileContext cc)
| 63 | } |
| 64 | |
| 65 | @Override |
| 66 | public Expr simplifyFor(final Simplify mode, final CompileContext cc) throws QueryException { |
| 67 | Expr expr = this; |
| 68 | if(mode.oneOf(Simplify.EBV, Simplify.PREDICATE)) { |
| 69 | // E[@x eq 'x'] → E[@x = 'x'] (enables further optimizations) |
| 70 | expr = toGeneral(cc, false); |
| 71 | } |
| 72 | return cc.simplify(this, expr, mode); |
| 73 | } |
| 74 | |
| 75 | /** |
| 76 | * Tries to rewrite this expression to a general comparison. |