-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](multi-catalog)put java udf to custom lib #34990
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. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
|
TeamCity be ut coverage result: |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41889 ms |
TPC-DS: Total hot run time: 182528 ms |
ClickBench: Total hot run time: 30.89 s |
|
|
|
run buildall |
1 similar comment
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41509 ms |
TPC-DS: Total hot run time: 171465 ms |
ClickBench: Total hot run time: 30.55 s |
|
run p0 |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 170563 ms |
ClickBench: Total hot run time: 30.07 s |
|
run buildall |
|
run buildall |
|
TeamCity be ut coverage result: |
TPC-H: Total hot run time: 41813 ms |
TPC-DS: Total hot run time: 171249 ms |
ClickBench: Total hot run time: 30.89 s |
|
run buildall |
|
clang-tidy review says "All clean, LGTM! 👍" |
TPC-H: Total hot run time: 39900 ms |
|
TeamCity be ut coverage result: |
TPC-DS: Total hot run time: 171149 ms |
ClickBench: Total hot run time: 29.72 s |
morningman
left a comment
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.
LGTM
|
|
||
| package org.apache.doris.analysis; | ||
|
|
||
| import okio.Path; |
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.
Wrong import
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
when use java udf , we can put its jars in custom_lib of FE and BE in advance, and then we can create function without file property:
```
CREATE FUNCTION java_udf_add_one(int) RETURNS int PROPERTIES (
"symbol"="org.apache.doris.udf.AddOne",
"always_nullable"="true",
"type"="JAVA_UDF"
);
```
and we can use file property for custom jar:
```
CREATE FUNCTION java_udf_add_one(int) RETURNS int PROPERTIES (
"file"="file:///path/to/java-udf-demo.jar",
"symbol"="org.apache.doris.udf.AddOne",
"always_nullable"="true",
"type"="JAVA_UDF"
);
```
on FE, we use null location if the 'file' property is not set
on BE, we get jar path if both file path location and checksum are null
when use java udf , we can put its jars in custom_lib of FE and BE in advance, and then we can create function without file property:
```
CREATE FUNCTION java_udf_add_one(int) RETURNS int PROPERTIES (
"symbol"="org.apache.doris.udf.AddOne",
"always_nullable"="true",
"type"="JAVA_UDF"
);
```
and we can use file property for custom jar:
```
CREATE FUNCTION java_udf_add_one(int) RETURNS int PROPERTIES (
"file"="file:///path/to/java-udf-demo.jar",
"symbol"="org.apache.doris.udf.AddOne",
"always_nullable"="true",
"type"="JAVA_UDF"
);
```
on FE, we use null location if the 'file' property is not set
on BE, we get jar path if both file path location and checksum are null
… jars (apache#35986) see apache#34990 user class maybe use some tripartite lib, we should put them back of fe jars to avoid conflicts
Proposed changes
when use java udf , we can put its jars in custom_lib of FE and BE in advance, and then we can create function without file property:
and we can use file property for custom jar:
on FE, we use null location if the 'file' property is not set
on BE, we get jar path if both file path location and checksum are null
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...