AltimateAI / AltimateAI/altimate-code
refactor: split data-diff.ts (1118 lines) into focused modules
- Vorherrschende Sprache
- TypeScript
- Sterne
- 811
- Forks
- 134
- Ø Merge
- 3 T. 2 Std.
- Gemergte PRs (30 T.)
- 50
Beschreibung
## What does this PR do?
Split `packages/opencode/src/altimate/native/connections/data-diff.ts` into multiple files:
- `dialect.ts` — warehouseTypeToDialect, resolveDialect, dateTruncExpr, quoteIdentForDialect
- `cte.ts` — CTE injection and query building
- `partitioning.ts` — buildPartitionDiscoverySQL, buildPartitionWhereClause, runPartitionedDiff
- `orchestrator.ts` — the main runDataDiff entry point
## Why
Flagged during the v0.6.0 release review (Tech Lead persona). The current file is 1,118 lines with 3 `as any` casts and mixes dialect mapping, CTE injection, executor, orchestrator, and partitioning concerns. Violates single-responsibility; makes targeted reviews hard.
## Proposed
Pure refactor — no behavior change. Move functions, preserve imports, update tests.
## Deferred from
v0.6.0 release review. Filed at tag time per no-follow-up-PRs release policy.
## Type of change
- [x] Refactor
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.