lriggs opened a new issue, #50109: URL: https://github.com/apache/arrow/issues/50109
### Describe the bug, including details regarding any error messages, version, and platform. Three small, independent bugs in Gandiva's runtime error messages: in two cases the message misrepresents what actually failed, and in one case a copy-paste error left the wrong function name in a message. What changed 1. levenshtein reported OOM as a length error [cpp/src/gandiva/precompiled/string_ops.cc:1738-1742](https://vscode-remote+ssh-002dremote-002b172-002e25-002e0-002e16.vscode-resource.vscode-cdn.net/home/logan.riggs/github/cpp/src/gandiva/precompiled/string_ops.cc#L1738-L1742) — when gdv_fn_context_arena_malloc returned null (i.e. memory allocation failed), the function set the error to "String length must be greater than 0". The condition is an OOM, not a length issue. 2. levenshtein length-bound message was off by one [cpp/src/gandiva/precompiled/string_ops.cc:1702-1708](https://vscode-remote+ssh-002dremote-002b172-002e25-002e0-002e16.vscode-resource.vscode-cdn.net/home/logan.riggs/github/cpp/src/gandiva/precompiled/string_ops.cc#L1702-L1708) — the precondition is in1_len < 0 || in2_len < 0, which rejects only negative lengths (zero is valid). The message said "must be greater than 0", implying zero was rejected too. 3. gdv_fn_aes_decrypt reported the wrong direction [cpp/src/gandiva/gdv_function_stubs.cc:411](https://vscode-remote+ssh-002dremote-002b172-002e25-002e0-002e16.vscode-resource.vscode-cdn.net/home/logan.riggs/github/cpp/src/gandiva/gdv_function_stubs.cc#L411) — inside the AES decrypt function, the OOM message said "Could not allocate memory for returning aes encrypt cypher text". Pure copy-paste from the sibling encrypt function. ### Component(s) Gandiva -- 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]
