diff --git a/pkg/otel/arrow_record/consumer.go b/pkg/otel/arrow_record/consumer.go index f4f907e7..99f63eb4 100644 --- a/pkg/otel/arrow_record/consumer.go +++ b/pkg/otel/arrow_record/consumer.go @@ -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 } @@ -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) } } @@ -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{}