Files
NB-076 94400d50d4 feat: add benchmark-programs — 58 telecom COBOL test programs
作为子目录纳入系统,与核心测试管道协同

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-25 09:53:21 +08:00

27 lines
1.1 KiB
Markdown

# 33-mix-1N-diffkeybreak — 1:N Matching with Different-Key Break
## 电信业务场景
线路+类型混合切替。先做线路↔通话类型的关联,再检测通话类型的变化。用于不同通话类型(语音/SMS/数据)的计费切换。
## Purpose
Demonstrates 1:N matching pattern where the key break detection uses a different key field than the match key, showing master-to-detail transitions.
## Test Coverage
1. **1:N matching** — One master (M0001) matched to three details
2. **Different-key break** — Key break is triggered by master ID change (M0001 -> M0002 -> M0003 -> M0004)
3. **Unmatched master ID** — Detail with M9999 has no matching master
4. **Summary per break** — Count and total per master ID group
5. **Final break** — Last group summary at end of file
## Data
- 4 master records (M0001 through M0004) with names, types, amounts
- 10 detail records with master ID references
## Key Techniques
- In-memory master table loaded at startup
- Key break on master ID field (different from detail transaction ID)
- Accumulator per break group
- Grand total across all groups
- Unmatched ID detection and reporting