-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
Currently the error message for not providing the correct function arguments is not straightforward:
❯ select factorial(3.0);
Error during planning: Coercion from [Float64] to the signature Uniform(1, [Int64]) failed.
Describe the solution you'd like
I like DuckDB's error message for wrong function arguments, we can adopt a similar approach to enhance the understandability of the error.
Providing candidate function signatures:
duckdb> select factorial(3.0);
Binder Error: No function matches the given name and argument types 'factorial(DECIMAL(2,1))'. You might need to add explicit type casts.
Candidate functions:
factorial(INTEGER) -> HUGEINT
"Did you mean" for wrong function names:
duckdb> select truncate();
Catalog Error: Scalar Function with name truncate does not exist!
Did you mean "trunc"?
LINE 1: select truncate();
The following tasks are planned to be implemented:
- Providing candidate function signatures Improve error message for wrong built-in scalar function signatures. #6415
- Fix wrong function name display in the error message (arrow_typeof() -> arrowtypeof()) Improve Display for BuiltinScalarFunction #6448
- "Did you mean" for wrong function names Improve error messages with function name suggestion. #6520
They're planned to be done on built-in scalar function first. Once done, it's easier to port everything into aggregate/window functions.
- Improve error message for aggregate functions
- Improve error message for window functions
Describe alternatives you've considered
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request