thisisnic commented on issue #31593: URL: https://github.com/apache/arrow/issues/31593#issuecomment-6419741198
Still a valid bug on `main` as of October 2026. `SimpleArena::Allocate` in `cpp/src/gandiva/simple_arena.h` returns NULL for a zero-byte request on a fresh arena, because `avail_buf_` starts as NULL and a chunk is only allocated when `avail_bytes_ < size`. Each `Projector::Evaluate` creates a new arena, so if the first arena-allocating function in a batch produces an empty output (e.g. `convert_replaceUTF8` on an empty string in the first row) it treats the NULL as out-of-memory and fails the batch. A fix would be to allocate the first chunk when `avail_buf_` is NULL, or return a static non-null pointer for zero-size requests, plus a test in `simple_arena_test.cc` for a zero-byte first allocation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
