Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udf: improve error message for function argument mismatch #9273

Closed
wangrunji0408 opened this issue Apr 19, 2023 · 1 comment · Fixed by #14435
Closed

udf: improve error message for function argument mismatch #9273

wangrunji0408 opened this issue Apr 19, 2023 · 1 comment · Fixed by #14435
Assignees
Labels
type/bug Something isn't working
Milestone

Comments

@wangrunji0408
Copy link
Contributor

wangrunji0408 commented Apr 19, 2023

Describe the bug

When users call a UDF with the correct name but invalid arguments, RisingWave will return an error saying the function is not supported. This is misleading. The error message should be improved.

dev=> create function foo(varchar[], int) returns bool
language python as foo using link 'http://localhost:8815/';

dev=> select foo(array['xxx']);
ERROR:  QueryError: Feature is not yet implemented: unsupported function: "foo"
Tracking issue: https://github.com/risingwavelabs/risingwave/issues/112

To Reproduce

No response

Expected behavior

The error message should be like pg: function name(types...) does not exist

postgres=# CREATE FUNCTION foo(x int) RETURNS int ...;
postgres=# select foo(1,2);
ERROR:  function foo(integer, integer) does not exist
line1: select foo(1,2);
              ^
No function matches the given name and argument types. You might need to add explicit type casts.

Additional context

No response

@wangrunji0408 wangrunji0408 added the type/bug Something isn't working label Apr 19, 2023
@wangrunji0408 wangrunji0408 self-assigned this Apr 19, 2023
@github-actions github-actions bot added this to the release-0.19 milestone Apr 19, 2023
@xxchan
Copy link
Member

xxchan commented Jul 12, 2023

I guess this is related with #9998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants