Integer/composite key encoding and comparator
Required search/key tests use integer components. Do not silently apply integer-only comparator to FLOAT or VARCHAR; reject unsupported explicit index types or implement a correct comparator after team review.
Contract
| Field | Value |
|---|---|
| Specification | INDEX-001 |
| Module | index |
| Scope | Required implementation or delivery |
| Milestone | M2, due 2026-12-20 |
| Owner role | Storage / search — sjr24 |
| Implementation | Planned; scaffold only |
| Contract review | Team review required before implementation |
Interface
IndexKey::compare; KeyCodec.encode/decode
These are proposed C++ design contracts, not an already implemented API. Shared types and ownership define the intended module boundaries.
Dependencies
- CORE-001: Typed values, schemas and stable record identifiers
- STORE-003: Row encoding and table-page slot layout
Acceptance checklist
- Order composite keys lexicographically without string-concatenation collisions
- Tie duplicate keys by stable RID in nonunique indexes
- Compare negative/positive integers and prefix bounds consistently
Verification
Use focused module checks plus the integration scenario above; no separate course score is claimed.
Completion rule
Link this spec and its GitLab issue in an MR into develop. Include relevant Linux evidence, obtain the other teammate’s review, merge, delete the feature branch, and close the issue. A page describes intended behavior; the GitLab issue and merged code determine completion.