Positional optimizations. @param op comparison operator @param cc compilation context @return optimized or original expression @throws QueryException query exception
(final CmpOp op, final CompileContext cc)
| 368 | * @throws QueryException query exception |
| 369 | */ |
| 370 | private Expr optPos(final CmpOp op, final CompileContext cc) throws QueryException { |
| 371 | if(POSITION.is(exprs[0]) && exprs[1].seqType().type.isNumberOrUntyped()) { |
| 372 | final Expr expr = Pos.get(exprs[1], op, info, cc, null); |
| 373 | if(expr != null) return expr; |
| 374 | } |
| 375 | return this; |
| 376 | } |
| 377 | |
| 378 | /** |
| 379 | * Analyzes the comparison and returns its optimization type. |
no test coverage detected