| 388 | } |
| 389 | |
| 390 | @Override |
| 391 | public final boolean indexAccessible(final IndexInfo ii) throws QueryException { |
| 392 | // only equality expressions on default collation can be rewritten |
| 393 | if(op != CmpOp.EQ || sc().collation != null) return false; |
| 394 | |
| 395 | Expr expr1 = exprs[0]; |
| 396 | IndexType type = null; |
| 397 | if(TOKENIZE.is(expr1)) { |
| 398 | if(!(expr1.arg(0).seqType().zeroOrOne() && ((FnTokenize) expr1).whitespace())) return false; |
| 399 | expr1 = expr1.arg(0); |
| 400 | type = IndexType.TOKEN; |
| 401 | } |
| 402 | return ii.create(exprs[1], ii.type(expr1, type), info); |
| 403 | } |
| 404 | |
| 405 | @Override |
| 406 | public CmpG copy(final CompileContext cc, final IntObjectMap<Var> vm) { |