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
-
levenshtein reported OOM as a length error
cpp/src/gandiva/precompiled/string_ops.cc:1738-1742 — 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.
-
levenshtein length-bound message was off by one
cpp/src/gandiva/precompiled/string_ops.cc:1702-1708 — 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.
-
gdv_fn_aes_decrypt reported the wrong direction
cpp/src/gandiva/gdv_function_stubs.cc:411 — 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
C++
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
levenshtein reported OOM as a length error
cpp/src/gandiva/precompiled/string_ops.cc:1738-1742 — 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.
levenshtein length-bound message was off by one
cpp/src/gandiva/precompiled/string_ops.cc:1702-1708 — 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.
gdv_fn_aes_decrypt reported the wrong direction
cpp/src/gandiva/gdv_function_stubs.cc:411 — 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
C++