ehddnr301 commented on PR #74552:
URL: https://github.com/apache/airflow/pull/74552#issuecomment-6148785746

   > Oof.
   > 
   > > by bumping the last character to the next Unicode code point
   > 
   > That sounds super fragile when dealing with anything unicode related. You 
probably have more experience of this than me -- if you tell me this approach 
as implemented in this PR is safe I'll believe you.
   
   For non-ASCII prefixes this PR doesn't bump at all, it just checks 
`substr(dag_display_name, 1, len(prefix)) = prefix`, so collation order doesn't 
matter there. Those searches just won't use the index.
   
   You were right about it being fragile though, and it's not just Unicode. 
With an ICU Czech collation, where `ch` sorts after `h`, a `c` prefix search 
misses `chata` (PG 16.15, `cs-CZ-x-icu`). Not a common setup for Airflow, and I 
haven't seen it with `en_US.utf8`, but it shows the bump approach depends on 
the collation.
   
   So I'd keep this PR as is since it fixes the common case, and sort out the 
shared filter in #74551, which I opened for it. I'll add the Czech case there 
too.


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

Reply via email to