Skip to content

Commit

Permalink
no more distinguish call needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jmacd committed Jul 16, 2024
1 parent 1180e5a commit 2c8bb67
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions pkg/otel/arrow_record/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ func (c *Consumer) Consume(bar *colarspb.BatchArrowRecords) (ibes []*record_mess
ipc.WithZstd(),
)
if err != nil {
return ibes, werror.Wrap(distinguishMemoryError(err))
return ibes, werror.Wrap(err)
}
sc.ipcReader = ipcReader
}
Expand All @@ -378,7 +378,7 @@ func (c *Consumer) Consume(bar *colarspb.BatchArrowRecords) (ibes []*record_mess
}

if err := sc.ipcReader.Err(); err != nil {
return ibes, werror.Wrap(distinguishMemoryError(err))
return ibes, werror.Wrap(err)
}
}

Expand All @@ -389,14 +389,6 @@ func (c *Consumer) Consume(bar *colarspb.BatchArrowRecords) (ibes []*record_mess
return ibes, nil
}

func distinguishMemoryError(err error) error {
limErr, ok := common.NewLimitErrorFromError(err)
if ok {
return limErr
}
return err
}

type runtimeChecker struct{}

var _ memory.TestingT = &runtimeChecker{}
Expand Down

0 comments on commit 2c8bb67

Please sign in to comment.