Describe the enhancement requested
Motivation
Gandiva's runtime errors are surfaced to SQL users via ExecutionContext::set_error_msg. An audit of all ~90 call sites in cpp/src/gandiva/ turned up two recurring problems:
- No SQL function name in the message. Users see
"divide by zero error" or "Output buffer length can't be negative" with no indication of which SQL function produced it, making errors hard to localize in long queries.
- The offending value is not echoed. Many messages reject a value (invalid weekday, bad boolean string, out-of-range index, …) without telling the user what was supplied.
A good runtime error should answer four questions: which function, what went wrong, what value triggered it, what's the valid range. This PR moves the highest-impact messages toward that bar.
Component(s)
Gandiva
Describe the enhancement requested
Motivation
Gandiva's runtime errors are surfaced to SQL users via
ExecutionContext::set_error_msg. An audit of all ~90 call sites incpp/src/gandiva/turned up two recurring problems:"divide by zero error"or"Output buffer length can't be negative"with no indication of which SQL function produced it, making errors hard to localize in long queries.A good runtime error should answer four questions: which function, what went wrong, what value triggered it, what's the valid range. This PR moves the highest-impact messages toward that bar.
Component(s)
Gandiva