Full Unicode case-mapping parity for case-insensitive field matching
- Ngôn ngữ chính
- C++
- Star
- 221
- Fork
- 124
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 21
Mô tả
### Context
Issue #613 asks for case-insensitive field matching consistent with iceberg-java and iceberg-python (both Unicode-aware), with `İ` (U+0130) as the example. PR #760 (Part of #613) made `StringUtils::ToLower` Unicode-aware using utf8proc **simple (1:1)** case mapping and added allocation-free ASCII fast paths.
This issue captures the **design and remaining plan** to reach full parity and tracks the follow-up PRs.
### Remaining gap
utf8proc's simple mapping still diverges from java for the few code points where simple ≠ full case mapping — chiefly `İ`:
| input | iceberg-cpp (simple) | iceberg-java `toLowerCase(Locale.ROOT)` / Python `str.lower()` |
|---|---|---|
| `İ` (U+0130) | `i` (U+0069) | `i̇` (U+0069 U+0307) |
So `EqualsIgnoreCase("İD", "id")` is **true** in iceberg-cpp but **false** in java/python — the inconsistency #613 is about.
### Design questions
- Match iceberg-java `toLowerCase(Locale.ROOT)` exactly; confirm the operation PyIceberg uses for matching and that it agrees.
- Full lowercase mapping vs. Unicode case folding: utf8proc offers full case folding (`utf8proc_map` + `UTF8PROC_CASEFOLD`); verify it reproduces the java/python result, or add a small explicit mapping.
- Keep the ASCII fast path; stream the non-ASCII path rather than materialize.
### Work Items
- [ ] Full case mapping to close the `İ` / java-parity gap
- [ ] Streaming / allocation-free non-ASCII comparison in `EqualsIgnoreCase` / `StartsWithIgnoreCase` (deferred from #760)
### References
- Issue: #613 (origin)
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
Bắt đầu bằng việc xem xét StringUtils::ToLower và các đường đi EqualsIgnoreCase/StartsWithIgnoreCase từ PR #760, sau đó so sánh phép case folding đầy đủ của utf8proc với iceberg-java và PyIceberg cho ví dụ İ. Được xem là hoàn tất khi có ánh xạ chữ hoa/chữ thường đầy đủ tương thích với Java/Python, giữ nguyên các đường đi ASCII nhanh và có đường đi so sánh non-ASCII theo kiểu streaming hoặc không cấp phát bộ nhớ.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp
- Lĩnh vực
- backend
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 35/100