`sql_check keys` is O(|L| x |R|) per probe and reports "unmatched keys found" for any key subset
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- sql, typescript
- Lĩnh vực
- data-engineering, databases
Hướng nghiên cứu
Start with checkKeys in packages/opencode/src/altimate/tools/sql-check.ts (around lines 314-347), where the correlated EXISTS probes are built, then read the verdict logic near line 382. The work spans query shape, the prefix/suffix probe and the reported wording, so it needs more context than a first contribution usually has. Done means 7k x 130k distinct keys finish in under 5 s, a left-subset result reports complete left coverage, and integer keys produce no prefix/suffix findings.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Problem
sql_check in keys mode can run for minutes on large tables and then reports "unmatched keys found" even when every left key matches a right key.
Mechanism
checkKeys(packages/opencode/src/altimate/tools/sql-check.ts:314-347) computescount(...)andexists(...)as correlatedEXISTSoverl x rwith functions applied to both sides (LOWER(TRIM()),regexp_replace, a leading-zeroCASE). Theprefix_suffixprobe is a non-equiSUBSTRcomparison. None can use a hash join, so each probe is |L| x |R|.- The verdict (
sql-check.ts:382) says "unmatched keys found" unlessmatched_exactequals both distinct counts, so a lookup of keys into a larger dimension table always "fails". Integer IDs also trigger a spurious prefix/suffix difference, because12is a prefix of123.
Evidence
- 119 recorded
keyschecks; 32 took over 30 s (3,170 s total, 10 sessions); one took 360 s with nothing else running. Size: 6,696 left keys x 127,600 right keys, about 854M pairs times seven probes. - 71 of 87 "unmatched keys found" verdicts had every left key matched exactly; 53 of those also flagged a spurious prefix/suffix difference.
Impact
Time (consumes budget in sessions using gpt-5.6-sol) and a misleading verdict.
Proposed fix
- Compute the normalised forms once per side in CTEs and match with equality joins.
- Run the prefix/suffix probe on a bounded sample, or only over unmatched keys.
- Report left coverage ("left subset of right: 6,696/6,696") separately from right coverage and word the verdict accordingly.
- Skip text-format probes when both columns are integer-typed.
Acceptance check
- 7k x 130k distinct keys finish in under 5 s.
- Left keys fully contained in a larger right set yield a verdict that says left coverage is complete.
- Integer keys do not produce prefix/suffix findings.
- Ngôn ngữ chính
- TypeScript
- Star
- 812
- Fork
- 123
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 97
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AltimateAI/altimate-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
AltimateAI/altimate-code#1454 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
test: MCP tests fail when the developer's ~/.claude.json has MCP servers (HOME is not sandboxed)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AltimateAI/altimate-code#1386 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AltimateAI/altimate-code#1384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
AltimateAI/altimate-code#1323 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
AltimateAI/altimate-code#1288 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của AltimateAI/altimate-code
Issue tương tự
-
skillopt: success-reflect prompt omits the edit schema, so every success-only edit is droppedĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Workspace secrets/constants containing "$" are corrupted when resolved in data source optionsĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
mobile-next/mobile-mcp#526 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
e2e-failure ready-to-code
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 73/100
redhat-developer/rhdh-plugin-export-overlays#4470 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày