our current implementations of BufferAllocator.buffer(int, int) returns null when it cannot allocate the buffer.
But looking through the code, there are many places that don't check if the allocated buffer is null before trying to access it which will throw a NullPointerException. ValueVectors' allocateNewSafe() seem to be the only place that handle the null in a specific manner. Should we update the allocators' implementation to throw an OutOfMemoryRuntimeException instead of returning null ? this has the added benefit of displaying a proper out of memory error message to the user. Thanks! -- Abdelhakim Deneche Software Engineer <http://www.mapr.com/> Now Available - Free Hadoop On-Demand Training <http://www.mapr.com/training?utm_source=Email&utm_medium=Signature&utm_campaign=Free%20available>
