-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](udf) alias udf skip check enable_java_udf #48843
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
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
TPC-H: Total hot run time: 32575 ms |
TPC-DS: Total hot run time: 192486 ms |
ClickBench: Total hot run time: 31.25 s |
| if (candidate.stream().anyMatch(builder -> !(builder instanceof AliasUdfBuilder))) { | ||
| FunctionUtil.checkEnableJavaUdfForNereids(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should move this check to org.apache.doris.catalog.FunctionRegistry#findFunctionBuilder(java.lang.String, java.lang.String, java.util.List<?>)
do as below:
we do two round search in candidates list if java udf is disable.
first round we only search other udf.
if no other udf is matched, we do second round search in java udf.
if no java udf is matched yet, we report no function matched.
if some java udfs are matched, we report java udf is disable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
run buildall |
|
run buildall |
|
run buildall |
|
run buildall |
TPC-H: Total hot run time: 32548 ms |
TPC-DS: Total hot run time: 195183 ms |
ClickBench: Total hot run time: 31.34 s |
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
if set Config.enable_java_udf = false, execute fe alias function will
throw exception:
```
MySQL root@127.0.0.1:(none)> create global alias function foo3(STRING) with parameter(s) as concat(s, "hello");
Query OK, 0 rows affected
Time: 7.590s
MySQL root@127.0.0.1:(none)> select foo3("tt");
(1105, 'errCode = 2, detailMessage = java_udf has been disabled.')
```
fix this, alias function no check enable_java_udf.
if set Config.enable_java_udf = false, execute fe alias function will
throw exception:
```
MySQL root@127.0.0.1:(none)> create global alias function foo3(STRING) with parameter(s) as concat(s, "hello");
Query OK, 0 rows affected
Time: 7.590s
MySQL root@127.0.0.1:(none)> select foo3("tt");
(1105, 'errCode = 2, detailMessage = java_udf has been disabled.')
```
fix this, alias function no check enable_java_udf.
if set Config.enable_java_udf = false, execute fe alias function will
throw exception:
```
MySQL root@127.0.0.1:(none)> create global alias function foo3(STRING) with parameter(s) as concat(s, "hello");
Query OK, 0 rows affected
Time: 7.590s
MySQL root@127.0.0.1:(none)> select foo3("tt");
(1105, 'errCode = 2, detailMessage = java_udf has been disabled.')
```
fix this, alias function no check enable_java_udf.
What problem does this PR solve?
if set Config.enable_java_udf = false, execute fe alias function will throw exception:
fix this, alias function no check enable_java_udf.
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)