feat: add range configuration to job and update extractors for inclusive range handling

This commit is contained in:
2026-04-21 11:29:34 -05:00
parent 09bd364976
commit 9eb8800864
5 changed files with 72 additions and 16 deletions

View File

@@ -15,7 +15,22 @@ func PartitionRangeGenerator(
tableInfo config.TableInfo,
partitionColumn string,
rowsPerPartition int64,
jobRange config.RangeConfig,
) ([]models.Partition, error) {
if jobRange.Max > 0 {
return []models.Partition{{
Id: uuid.New(),
HasRange: true,
RetryCounter: 0,
Range: models.PartitionRange{
Min: jobRange.Min,
Max: jobRange.Max,
IsMinInclusive: jobRange.IsMinInclusive,
IsMaxInclusive: jobRange.IsMaxInclusive,
},
}}, nil
}
rowsCount, err := tableAnalyzer.EstimateTotalRows(ctx, tableInfo)
if err != nil {
return nil, err