You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/11/09 06:08:00 UTC
[GitHub] [doris] zhangstar333 opened a new pull request, #14106: [Bug](udf) fix java-udaf process string type error and add some tests
zhangstar333 opened a new pull request, #14106:
URL: https://github.com/apache/doris/pull/14106
# Proposed changes
- add is_return_null in create java-udf function
- fix udaf process string and date type error
- add some tests about udaf
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
5. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
6. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
7. Does it need to update dependencies:
- [ ] Yes
- [ ] No
8. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] Gabriel39 merged pull request #14106: [Bug](udf) fix java-udaf process string type error and add some tests
Posted by GitBox <gi...@apache.org>.
Gabriel39 merged PR #14106:
URL: https://github.com/apache/doris/pull/14106
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #14106: [Bug](udf) fix java-udaf process string type error and add some tests
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14106:
URL: https://github.com/apache/doris/pull/14106#issuecomment-1308424859
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] Gabriel39 commented on a diff in pull request #14106: [Bug](udf) fix java-udaf process string type error and add some tests
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #14106:
URL: https://github.com/apache/doris/pull/14106#discussion_r1017482468
##########
docs/zh-CN/docs/ecosystem/udf/java-user-defined-function.md:
##########
@@ -74,16 +74,20 @@ PROPERTIES (["key"="value"][,...])
1. PROPERTIES中`symbol`表示的是包含UDF类的类名,这个参数是必须设定的。
2. PROPERTIES中`file`表示的包含用户UDF的jar包,这个参数是必须设定的。
3. PROPERTIES中`type`表示的 UDF 调用类型,默认为 Native,使用 Java UDF时传 JAVA_UDF。
-4. name: 一个function是要归属于某个DB的,name的形式为`dbName`.`funcName`。当`dbName`没有明确指定的时候,就是使用当前session所在的db作为`dbName`。
+4. PROPERTIES中`is_return_null`表示的 UDF 返回结果中是否有可能出现NULL值,可以设定为true或false。
Review Comment:
```suggestion
4. PROPERTIES中`always_nullable`表示的 UDF 返回结果中是否有可能出现NULL值,可以设定为true或false。
```
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java:
##########
@@ -221,6 +228,19 @@ private void analyzeCommon(Analyzer analyzer) throws AnalysisException {
throw new AnalysisException("library's checksum is not equal with input, checksum=" + checksum);
}
}
+ if (binaryType == TFunctionBinaryType.JAVA_UDF) {
+ String returnNullModeStr = properties.get(IS_RETURN_NULL);
+ if (returnNullModeStr == null) {
Review Comment:
Make it optional and ALWAYS_NULLABLE by default
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CreateFunctionStmt.java:
##########
@@ -96,6 +97,8 @@ public class CreateFunctionStmt extends DdlStmt {
public static final String MERGE_METHOD_NAME = "merge";
public static final String GETVALUE_METHOD_NAME = "getValue";
public static final String STATE_CLASS_NAME = "State";
+ // add for java udf check return type nullable mode, always_nullable or always_not_nullable
+ public static final String IS_RETURN_NULL = "is_return_null";
Review Comment:
```suggestion
public static final String IS_RETURN_NULL = "always_nullable";
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] hello-stephen commented on pull request #14106: [Bug](udf) fix java-udaf process string type error and add some tests
Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #14106:
URL: https://github.com/apache/doris/pull/14106#issuecomment-1308275025
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.99 seconds
load time: 509 seconds
storage size: 17179320470 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221109062951_clickbench_pr_42526.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #14106: [Bug](udf) fix java-udaf process string type error and add some tests
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14106:
URL: https://github.com/apache/doris/pull/14106#issuecomment-1309640114
PR approved by at least one committer and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [doris] github-actions[bot] commented on pull request #14106: [Bug](udf) fix java-udaf process string type error and add some tests
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #14106:
URL: https://github.com/apache/doris/pull/14106#issuecomment-1308424907
PR approved by anyone and no changes requested.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org