10000 [BugFix] Fix the error message when create udf failed (backport #60020) by mergify[bot] · Pull Request #60048 · StarRocks/starrocks · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[BugFix] Fix the error message when create udf failed (backport #60020) #60048

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

Merged
merged 1 commit into from
Jun 19, 2025

Conversation

mergify[bot]
Copy link
Contributor
@mergify mergify bot commented Jun 19, 2025

Why I'm doing:

If I create a udf with an invalid symbol, starrocks will throw this exception to the user, so they won't get the real reason for the failure.

mysql> CREATE FUNCTION invalid_func(bigint) RETURNS bigint symbol = "SumbigintInvalid" type = "St
arrocksJar" file = "http://starrocks-thirdparty.oss-cn-zhangjiakou.aliyuncs.com/starrocks-jdbc%2FSumbigint.jar"

Error 1347 (HY000): Getting analyzing error. Detail message: '%s'.'%s' is not '%s'.

2025-06-18 11:59:19.899+08:00 INFO (starrocks-mysql-nio-pool-1|516) [StmtExecutor.execute():828] execute Exception, sql: CREATE FUNCTION invalid_func(bigint) RETURNS bigint symbol = "SumbigintInvalid" type = "St
arrocksJar" file = "http://starrocks-thirdparty.oss-cn-zhangjiakou.aliyuncs.com/starrocks-jdbc%2FSumbigint.jar", error: Getting analyzing error. Detail message: '%s'.'%s' is not '%s'.
    ERR_WRONG_OBJECT(1347, new byte[] {'H', 'Y', '0', '0', '0'}, "'%s'.'%s' is not '%s'"),

This error should be used as xxx_db.xxx_table is not an OLAP table, so we should not use this exception for class not found. However, I can't find a suitable exception, so I use ERR_COMMON_ERROR.

mysql> CREATE FUNCTION invalid_func(bigint) RETURNS bigint symbol = "SumbigintInvalid" type = "StarrocksJar" file = "http://starrocks-thirdparty.oss-cn-zhangjiakou.aliyuncs.com/starrocks-jdbc%2FSumbigint.jar";
ERROR 5064 (42000): Getting analyzing error. Detail message: Class 'SumbigintInvalid' not found in object_file :http://starrocks-thirdparty.oss-cn-zhangjiakou.aliyuncs.com/starrocks-jdbc%2FSumbigint.jar.

What I'm doing:

Fix the error message when create udf failed

What type of PR is this:

  • BugFix
  • Feature
  • Enhancement
  • Refactor
  • UT
  • Doc
  • Tool

Does this PR entail a change in behavior?

  • Yes, this PR will result in a change in behavior.
  • No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • Parameter changes: default values, similar parameters but with different default values
  • Policy changes: use new policy to replace old one, functionality automatically enabled
  • Feature removed
  • Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • I have added test cases for my bug fix or my new feature
  • This pr needs user documentation (for new or modified features or behaviors)
    • I have added documentation for my new feature or new function
  • This is a backport pr

Bugfix cherry-pick branch check:

  • I have checked the version labels which the pr will be auto-backported to the target branch
    • 3.5
    • 3.4
    • 3.3

This is an automatic backport of pull request #60020 done by [Mergify](https://mergify.com).

Signed-off-by: trueeyu <lxhhust350@qq.com>
(cherry picked from commit 7cc8487)
Copy link

@wanpengfei-git wanpengfei-git merged commit b131ca8 into branch-3.5 Jun 19, 2025
48 of 49 checks passed
@wanpengfei-git wanpengfei-git deleted the mergify/bp/branch-3.5/pr-60020 branch June 19, 2025 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0