AltimateAI / AltimateAI/altimate-code

refactor: split data-diff.ts (1118 lines) into focused modules

Aperta
#732 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
811
Fork
134
Merge medio
3g 2h
PR unite (30g)
50

Descrizione

## 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.