twilliamson commented on PR #16153:
URL: https://github.com/apache/druid/pull/16153#issuecomment-2046252316

   Backtracking isn't needed – the bug in my current PR is in the 
suffix-handling logic. ☹️ 
   
   At a high level, there are three parts to the match:
   - Must start with (the prefix)
   - Must end with (the suffix)
   - Must contain (list of clauses)
   
   The special thing about the "starts with" and "ends with" parts is they have 
to match a particular part of the string (either anchored at the start or 
anchored at the end, respectively). The list of "contains" clauses can eagerly 
match the first occurrence. That is, if I'm looking for `a%j%z`, then the `a` 
has to match the first `a` and the `z` has to match the last `z`, but the `j` 
can match any `j` that's not the first or last.
   
   The current PR is splitting clauses on either `%` or `_` and assuming the 
last clause is the suffix, but the suffix is actually everything after the last 
`%`. I'll fix the suffix handling and update the PR.


-- 
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]

Reply via email to