From cdaec2e0d2cd787ffb0178d88e4fa87a5bf4dc76 Mon Sep 17 00:00:00 2001 From: Samir Patel <48686912+54mir@users.noreply.github.com> Date: Thu, 4 Nov 2021 16:04:00 -0500 Subject: [PATCH] remove duplicate checks --- api.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/api.go b/api.go index 5aba8d272..42d7e3b0d 100644 --- a/api.go +++ b/api.go @@ -1769,9 +1769,6 @@ func (api *API) ImportValueWithTx(ctx context.Context, qcx *Qcx, req *ImportValu // if we're importing into a specific shard if req.Shard != math.MaxUint64 { - if len(req.ColumnIDs) == 0 { - return errors.Wrap(err, "calculating shard, no columns in request") - } // Check that column IDs match the stated shard. shard := req.ColumnIDs[0] / ShardWidth if s2 := req.ColumnIDs[len(req.ColumnIDs)-1] / ShardWidth; (shard != s2) || (shard != req.Shard) { @@ -1810,9 +1807,6 @@ func (api *API) ImportValueWithTx(ctx context.Context, qcx *Qcx, req *ImportValu return errors.Wrap(err, "importing value") } // end if req.Shard != math.MaxUint64 - if len(req.ColumnIDs) == 0 { - return errors.Wrap(err, "calculating shard, no columns in request") - } options.IgnoreKeyCheck = true start := 0 shard := req.ColumnIDs[0] / ShardWidth