| 429 | } |
| 430 | |
| 431 | func (d *DataIterationBatchSizePerTableOverride) Validate() error { |
| 432 | if d != nil { |
| 433 | if _, found := d.ControlPoints[d.MinRowSize]; !found { |
| 434 | return fmt.Errorf("must provide batch size for MinRowSize") |
| 435 | } |
| 436 | if _, found := d.ControlPoints[d.MaxRowSize]; !found { |
| 437 | return fmt.Errorf("must provide batch size for MaxRowSize") |
| 438 | } |
| 439 | if d.TableOverride == nil { |
| 440 | d.TableOverride = map[string]map[string]uint64{} |
| 441 | } |
| 442 | } |
| 443 | return nil |
| 444 | } |
| 445 | |
| 446 | func (d *DataIterationBatchSizePerTableOverride) UpdateBatchSizes(db *sql.DB, tables TableSchemaCache) error { |
| 447 | schemaTablesMap := map[string][]string{} |