This updates memory-limit error handling because, prior to this fix, there were two fallbacks.
(1) the use of os.Stderr to print the message that we had lost
(2) a test for the expected number of records to match
The first is now removed (i.e. no printing to os.Stderr). The second is now an internal error.
The consumer is expected to test for the memory limit error explicitly (e.g., and handle it as ResourceExhausted). A new function is added to do this (NewLimitErrorFromError) that parses the message using a regexp. An upstream issue report and PR will be filed with Arrow-Go to overcome this in the future.
Part of #210.
This updates memory-limit error handling because, prior to this fix, there were two fallbacks.
(1) the use of os.Stderr to print the message that we had lost (2) a test for the expected number of records to match
The first is now removed (i.e. no printing to os.Stderr). The second is now an internal error.
The consumer is expected to test for the memory limit error explicitly (e.g., and handle it as ResourceExhausted). A new function is added to do this (NewLimitErrorFromError) that parses the message using a regexp. An upstream issue report and PR will be filed with Arrow-Go to overcome this in the future.
See https://github.com/apache/arrow/pull/41989.