Skip to content

[C++][Gandiva] Improve function error messages #50111

@lriggs

Description

@lriggs

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:

  1. 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.
  2. 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

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions