airborne12 commented on PR #67538: URL: https://github.com/apache/doris/pull/67538#issuecomment-5631085658
### Correction: the scan-node commit is dropped, and the escape coverage moves to where it belongs **`8dbd415` is gone from this branch.** The abort came from `_should_push_down_function_filter`, which turns a LIKE into a `LikeColumnPredicate` for the storage layer. That is not the index path -- gram acceleration is decided in `can_evaluate_inverted_index` / `evaluate_inverted_index` -- and the three-child form of LIKE was never supported there, which is what its assertion says. Changing it does not belong in a PR about gram indexes. **One claim in my earlier comment was wrong.** I wrote that a release backend "pushes the pattern down with the custom escape character silently dropped". Not for the row-level evaluation: `LikeColumnPredicate` reads its `LikeState` from the function context, `FunctionLike::construct_like_const_state` has already rewritten the pattern through `replace_pattern_by_escape`, and the constant-pattern functions ignore the raw pattern argument. Rows are matched correctly. What is actually affected is only the NGram BloomFilter probe, which `TabletReader::_init_column_predicates` builds from the raw pattern while `NgramTokenExtractor::next_in_string_like` treats backslash as the only escape. Both that and the assertion are reported separately; they predate this PR and no suite in the repository exercised `LIKE ... ESCAPE` before. **What changes here instead.** The suite drops its two `ESCAPE '!'` patterns. A custom escape is precisely the case the index refuses, so in a suite about index acceleration those two queries measured the fallback and nothing else. What they were really guarding -- which escape forms are eligible -- is now a unit test on the arguments alone: a backslash escape is accepted and accelerated like a two-child LIKE, a custom escape and a non-literal escape are refused. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
