ehddnr301 opened a new issue, #74724:
URL: https://github.com/apache/airflow/issues/74724

   ### Under which category would you file this issue?
   
   Airflow Core
   
   ### Apache Airflow version
   
   3.4.0 (`main` at `f31684af8596377142ecc587cd9b2030eac86a8b`)
   
   ### What happened and how to reproduce it?
   
   The shared prefix matcher builds an upper bound by bumping the last 
character to the next code point. #74552 skips that bound when the bumped 
character is non-ASCII, but collations with contractions can break the 
code-point order for ASCII too.
   
   On PostgreSQL 16.15 with the ICU `cs-CZ-x-icu` collation, `ch` sorts after 
`h`:
   
   ```sql
   SELECT 'chata' < 'd' COLLATE "cs-CZ-x-icu"; -- false
   ```
   
   So the prefix `c` (`>= 'c' AND < 'd'`) misses `chata`.
   
   1. Save as `dev/reproduce_prefix_czech.py`:
   
   ```python
   from sqlalchemy import String, literal, select
   
   from airflow import settings
   from airflow.api_fastapi.common.parameters.search import _PrefixSearchParam
   
   name = literal("chata", type_=String()).collate("cs-CZ-x-icu")
   param = _PrefixSearchParam(name).set_value("c")
   with settings.engine.connect() as connection:
       print(connection.scalars(param.to_orm(select(name))).all())
   ```
   
   2. Run it:
   
   ```bash
   breeze run --backend postgres --postgres-version 16 python 
dev/reproduce_prefix_czech.py
   ```
   
   Output: `[]`
   
   Drafted-by: Claude Code (Opus 5.5); reviewed by @ehddnr301 before posting
   
   ### What you think should happen instead?
   
   The prefix filter should return `chata`, since it starts with `c`.
   
   
   ### Operating System
   
   Debian GNU/Linux 12 (bookworm), Breeze CI container
   
   ### Deployment
   
   Docker-Compose
   
   ### Apache Airflow Provider(s)
   
   _No response_
   
   ### Versions of Apache Airflow Providers
   
   _No response_
   
   ### Official Helm Chart version
   
   Not Applicable
   
   ### Kubernetes Version
   
   _No response_
   
   ### Helm Chart configuration
   
   _No response_
   
   ### Docker Image customizations
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [x] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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