Merge pull request #1726 from molecula/csv-error-17

adds more detail to CSV ingest error message
This commit is contained in:
Kasey C. Rodgers 2021-10-12 07:04:22 -07:00 • committed by GitHub
commit c4a348724e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -1277,7 +1277,7 @@ func (b *Batch) importValueData() error {
start := time.Now()
err := b.client.DoImportValues(b.index.Name(), shard, path, data)
b.log.Debugf("imp-vals %s,shard:%d,data:%d %v", field, shard, len(data), time.Since(start))
return errors.Wrapf(err, "importing values for %s", field)
return errors.Wrapf(err, "importing values for field = %s", field)
})
startIdx = i
curShard = recordID / shardWidth
@ -1350,7 +1350,7 @@ func (b *Batch) importMutexData() error {
start := time.Now()
err := b.client.DoImport(b.index.Name(), shard, path, data)
b.log.Debugf("imp-mux %s,shard:%d,data:%d %v", field.Name(), shard, len(data), time.Since(start))
return errors.Wrapf(err, "importing values for %s", field)
return errors.Wrapf(err, "importing values for field = %s", field)
})
startIdx = i
curShard = recordID / shardWidth

View file

@ -1683,9 +1683,9 @@ func (f *Field) importValue(qcx *Qcx, columnIDs []uint64, values []int64, shard
for i := range columnIDs {
columnID, value := columnIDs[i], values[i]
if value > bsig.Max {
return fmt.Errorf("%v, columnID=%v, value=%v", ErrBSIGroupValueTooHigh, columnID, value)
return fmt.Errorf("%v, imported value = %v, columnID = %v", ErrBSIGroupValueTooHigh, value, columnID)
} else if value < bsig.Min {
return fmt.Errorf("%v, columnID=%v, value=%v", ErrBSIGroupValueTooLow, columnID, value)
return fmt.Errorf("%v, imported value = %v, columnID = %v", ErrBSIGroupValueTooLow, value, columnID)
}
if value > max {
max = value

View file

@ -50,8 +50,8 @@ var (
ErrInvalidBSIGroupType = errors.New("invalid bsigroup type")
ErrInvalidBSIGroupRange = errors.New("invalid bsigroup range")
ErrInvalidBSIGroupValueType = errors.New("invalid bsigroup value type")
ErrBSIGroupValueTooLow = errors.New("bsigroup value too low")
ErrBSIGroupValueTooHigh = errors.New("bsigroup value too high")
ErrBSIGroupValueTooLow = errors.New("value too low for configured field range")
ErrBSIGroupValueTooHigh = errors.New("value too high for configured field range")
ErrInvalidRangeOperation = errors.New("invalid range operation")
ErrInvalidBetweenValue = errors.New("invalid value for between operation")
ErrDecimalOutOfRange = errors.New("decimal value out of range")