mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 03:17:50 +00:00
remove shard list from mapper error message to avoid duplicate output
This commit is contained in:
parent
53da35eb00
commit
04bf214f81
1 changed files with 29 additions and 29 deletions
58
executor.go
58
executor.go
|
|
@ -743,47 +743,47 @@ func (e *executor) executeCall(ctx context.Context, qcx *Qcx, index string, c *p
|
|||
case "Sum":
|
||||
statFn()
|
||||
res, err := e.executeSum(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeSum %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeSum %v", shardSlice(shards))
|
||||
case "Min":
|
||||
statFn()
|
||||
res, err := e.executeMin(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeMin %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeMin %v", shardSlice(shards))
|
||||
case "Max":
|
||||
statFn()
|
||||
res, err := e.executeMax(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeMax %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeMax %v", shardSlice(shards))
|
||||
case "MinRow":
|
||||
statFn()
|
||||
res, err := e.executeMinRow(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeMinRow %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeMinRow %v", shardSlice(shards))
|
||||
case "MaxRow":
|
||||
statFn()
|
||||
res, err := e.executeMaxRow(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeMaxRow %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeMaxRow %v", shardSlice(shards))
|
||||
case "Clear":
|
||||
statFn()
|
||||
res, err := e.executeClearBit(ctx, qcx, index, c, opt)
|
||||
return res, errors.Wrapf(err, "executeClearBit %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeClearBit %v", shardSlice(shards))
|
||||
case "ClearRow":
|
||||
statFn()
|
||||
res, err := e.executeClearRow(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeClearRow %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeClearRow %v", shardSlice(shards))
|
||||
case "Distinct":
|
||||
statFn()
|
||||
res, err := e.executeDistinct(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeDistinct %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeDistinct %v", shardSlice(shards))
|
||||
case "Store":
|
||||
statFn()
|
||||
res, err := e.executeSetRow(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeSetRow %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeSetRow %v", shardSlice(shards))
|
||||
case "Count":
|
||||
statFn()
|
||||
res, err := e.executeCount(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeCount %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeCount %v", shardSlice(shards))
|
||||
case "Set":
|
||||
statFn()
|
||||
res, err := e.executeSet(ctx, qcx, index, c, opt)
|
||||
return res, errors.Wrapf(err, "executeSet %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeSet %v", shardSlice(shards))
|
||||
case "SetRowAttrs":
|
||||
statFn()
|
||||
return nil, errors.Wrap(e.executeSetRowAttrs(ctx, qcx, index, c, opt), "executeSetRowAttrs")
|
||||
|
|
@ -793,61 +793,61 @@ func (e *executor) executeCall(ctx context.Context, qcx *Qcx, index string, c *p
|
|||
case "TopK":
|
||||
statFn()
|
||||
res, err := e.executeTopK(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeTopK %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeTopK %v", shardSlice(shards))
|
||||
case "TopN":
|
||||
statFn()
|
||||
res, err := e.executeTopN(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeTopN %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeTopN %v", shardSlice(shards))
|
||||
case "Rows":
|
||||
statFn()
|
||||
res, err := e.executeRows(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeRows %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeRows %v", shardSlice(shards))
|
||||
case "ExternalLookup":
|
||||
statFn()
|
||||
res, err := e.executeExternalLookup(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeExternalLookup %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeExternalLookup %v", shardSlice(shards))
|
||||
case "Extract":
|
||||
statFn()
|
||||
res, err := e.executeExtract(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeExtract %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeExtract %v", shardSlice(shards))
|
||||
case "GroupBy":
|
||||
statFn()
|
||||
res, err := e.executeGroupBy(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeGroupBy %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeGroupBy %v", shardSlice(shards))
|
||||
case "Options":
|
||||
statFn()
|
||||
res, err := e.executeOptionsCall(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeOptionsCall %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeOptionsCall %v", shardSlice(shards))
|
||||
case "IncludesColumn":
|
||||
res, err := e.executeIncludesColumnCall(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeIncludesColumnCall %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeIncludesColumnCall %v", shardSlice(shards))
|
||||
case "FieldValue":
|
||||
statFn()
|
||||
res, err := e.executeFieldValueCall(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeFieldValueCall %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeFieldValueCall %v", shardSlice(shards))
|
||||
case "Precomputed":
|
||||
res, err := e.executePrecomputedCall(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executePrecomputedCall %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executePrecomputedCall %v", shardSlice(shards))
|
||||
case "UnionRows":
|
||||
res, err := e.executeUnionRows(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeUnionRows %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeUnionRows %v", shardSlice(shards))
|
||||
case "ConstRow":
|
||||
res, err := e.executeConstRow(ctx, index, c)
|
||||
return res, errors.Wrapf(err, "executeConstRow %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeConstRow %v", shardSlice(shards))
|
||||
case "Limit":
|
||||
res, err := e.executeLimitCall(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeLimitCall %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeLimitCall %v", shardSlice(shards))
|
||||
case "Percentile":
|
||||
res, err := e.executePercentile(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executePercentile %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executePercentile %v", shardSlice(shards))
|
||||
case "Delete":
|
||||
statFn() //TODO(twg) need this?
|
||||
res, err := e.executeDeleteRecords(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeDelete %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeDelete %v", shardSlice(shards))
|
||||
default: // e.g. "Row", "Union", "Intersect" or anything that returns a bitmap.
|
||||
statFn()
|
||||
res, err := e.executeBitmapCall(ctx, qcx, index, c, shards, opt)
|
||||
return res, errors.Wrapf(err, "executeBitmapCall %v", shardSlice(shards).String())
|
||||
return res, errors.Wrapf(err, "executeBitmapCall %v", shardSlice(shards))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3052,7 +3052,7 @@ func (e *executor) executeGroupBy(ctx context.Context, qcx *Qcx, index string, c
|
|||
// Get full result set.
|
||||
other, err := e.mapReduce(ctx, index, shards, c, opt, mapFn, reduceFn)
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "mapReduce shards: %v", shardSlice(shards).String())
|
||||
return nil, errors.Wrapf(err, "mapReduce shards: %v", shardSlice(shards))
|
||||
}
|
||||
results, _ := other.([]GroupCount)
|
||||
|
||||
|
|
@ -6066,7 +6066,7 @@ func (e *executor) mapper(ctx context.Context, eg *errgroup.Group, ch chan mapRe
|
|||
// Group shards together by nodes.
|
||||
m, err := e.shardsByNode(nodes, index, shards)
|
||||
if err != nil {
|
||||
return errors.Wrapf(err, "shards by node %v", shardSlice(shards).String())
|
||||
return errors.Wrapf(err, "")
|
||||
}
|
||||
done := ctx.Done()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue