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/12/17 14:13:57 UTC
[GitHub] [doris] maochongxin opened a new pull request, #15154: Patch 1
maochongxin opened a new pull request, #15154:
URL: https://github.com/apache/doris/pull/15154
# Proposed changes
Issue Number: close #14970
## Problem summary
support roundBankers
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [x] No
- [ ] I don't know
2. Has unit tests been added:
- [x] Yes
- [ ] No
- [ ] No Need
3. Has document been added or modified:
- [ ] Yes
- [x] No
- [ ] No Need
4. Does it need to update dependencies:
- [ ] Yes
- [x] No
5. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [x] 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] github-actions[bot] commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1362392789
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357996665
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1360929098
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1356775155
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357036008
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1358766389
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361147112
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361242498
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361659567
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
hello-stephen commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1356290390
TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 34.83 seconds
load time: 473 seconds
storage size: 17123356936 Bytes
https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20221217143656_clickbench_pr_64679.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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357156593
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361754168
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1360111462
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1360991960
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1360915153
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357036031
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
[GitHub] [doris] Gabriel39 commented on a diff in pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #15154:
URL: https://github.com/apache/doris/pull/15154#discussion_r1052793139
##########
docs/zh-CN/docs/sql-manual/sql-functions/math-functions/round_bankers.md:
##########
@@ -0,0 +1,79 @@
+---
+{
+ "title": "roundBankers",
Review Comment:
round_bankers
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357017741
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1356277220
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #15154:
URL: https://github.com/apache/doris/pull/15154#discussion_r1053909651
##########
gensrc/script/doris_builtins_functions.py:
##########
@@ -1831,24 +1831,32 @@
'_ZN5doris13MathFunctions5floorEPN9doris_udf15FunctionContextERKNS1_9DoubleValE', '', '', 'vec', ''],
[['round', 'dround'], 'DOUBLE', ['DOUBLE'],
'_ZN5doris13MathFunctions5roundEPN9doris_udf15FunctionContextERKNS1_9DoubleValE', '', '', 'vec', ''],
+ [['round_bankers'], 'DOUBLE', ['DOUBLE'],
+ '__ZN5doris13MathFunctions13round_bankersEPN9doris_udf15FunctionContextERKNS1_9DoubleValE', '', '', 'vec', ''],
[['ceil', 'ceiling', 'dceil'], 'DECIMAL32', ['DECIMAL32'],
'_ZN5doris13MathFunctions4ceilEPN9doris_udf15FunctionContextERKNS1_9DoubleValE', '', '', 'vec', ''],
[['floor', 'dfloor'], 'DECIMAL32', ['DECIMAL32'],
'_ZN5doris13MathFunctions5floorEPN9doris_udf15FunctionContextERKNS1_9DoubleValE', '', '', 'vec', ''],
[['round', 'dround'], 'DECIMAL32', ['DECIMAL32'],
'_ZN5doris13MathFunctions5roundEPN9doris_udf15FunctionContextERKNS1_9DoubleValE', '', '', 'vec', ''],
+ [['round_bankers'], 'DECIMAL32', ['DECIMAL32'],
Review Comment:
DECIMAL64 and DECIMAL128 are needed
--
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 a diff in pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on code in PR #15154:
URL: https://github.com/apache/doris/pull/15154#discussion_r1053707134
##########
be/src/exprs/math_functions.cpp:
##########
@@ -222,6 +222,22 @@ BigIntVal MathFunctions::round(FunctionContext* ctx, const DoubleVal& v) {
return BigIntVal(static_cast<int64_t>(v.val + ((v.val < 0) ? -0.5 : 0.5)));
}
+BigIntVal MathFunctions::round_bankers(FunctionContext* ctx, const DoubleVal& v) {
+ double fraction = v.val - std::floor(v.val);
+ if (fraction < 0.5) {
+ return BigIntVal(static_cast<int64_t>(std::floor(v.val)));
+ } else if (fraction > 0.5) {
+ return BigIntVal(static_cast<int64_t>(std::ceil(v.val)));
+ } else {
+ auto lower = floor(v.val);
Review Comment:
warning: too few arguments to function call, expected 2, have 1; did you mean '::floor'? [clang-diagnostic-error]
```suggestion
auto lower = ::floor(v.val);
```
**/usr/include/x86_64-linux-gnu/bits/mathcalls.h:164:** '::floor' declared here
```cpp
__MATHCALLX (floor,, (_Mdouble_ __x), (__const__));
^
```
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1356774638
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #15154:
URL: https://github.com/apache/doris/pull/15154#discussion_r1052793139
##########
docs/zh-CN/docs/sql-manual/sql-functions/math-functions/round_bankers.md:
##########
@@ -0,0 +1,79 @@
+---
+{
+ "title": "roundBankers",
Review Comment:
roun_bankers
--
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 pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1362933270
Merged. Thanks for your contribution!
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 merged PR #15154:
URL: https://github.com/apache/doris/pull/15154
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361660442
clang-tidy review says "All clean, LGTM! :+1:"
--
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] maochongxin commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
maochongxin commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1356741818
> Great job! Could you also add some documents for this new function?
Ok, let me do this
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1360991659
clang-tidy review says "All clean, LGTM! :+1:"
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357148637
clang-tidy review says "All clean, LGTM! :+1:"
--
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] maochongxin commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
maochongxin commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357160947
> There are some format problems and you need to fix them before merging
fixed
--
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 pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1359364237
Do you still want to update this PR? If not, maybe you should make this PR ready for review
--
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 pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361019911
You also need to update the result file in regression/data after adding a test SQL. Pls refer to https://doris.incubator.apache.org/zh-CN/community/developer-guide/regression-testing for more details.
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361153244
clang-tidy review says "All clean, LGTM! :+1:"
--
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 pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1362620981
> I've finished, help code review @Gabriel39
Some bugs are fixed in master branch recently but still exist in your dev branch. Could you rebase the master branch and push again?
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1362635244
clang-tidy review says "All clean, LGTM! :+1:"
--
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 pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357137404
There are some format problems and you need to fix them before merging
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357999211
clang-tidy review says "All clean, LGTM! :+1:"
--
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 pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1359379456
> I am currently using mysql-client to connect to fe locally, but I cannot use round_bankers. I am looking into this problem, and can you reproduce it?
I think you forget to register this function in FE's FunctionSet. You can add it in gensrc/script/doris_builtin_functions.py just like function round.
Btw, you'd better to add a SQL-like regression test case in folder regression/suites
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1358008951
clang-tidy review says "All clean, LGTM! :+1:"
--
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] morningman commented on a diff in pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
morningman commented on code in PR #15154:
URL: https://github.com/apache/doris/pull/15154#discussion_r1051853035
##########
docs/en/docs/sql-manual/sql-functions/math-functions/round_bankers.md:
##########
@@ -0,0 +1,80 @@
+---
+{
+ "title": "roundBankers",
+ "language": "en"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## roundBankers
+
+### description
+#### Syntax
+
+`roundBankers(x), roundBankers(x, d)`
Review Comment:
the function name should be `round_bankers`, not `roundBankers`
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1357150829
clang-tidy review says "All clean, LGTM! :+1:"
--
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] maochongxin commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
maochongxin commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1362394084
I've finished, help code review @Gabriel39
--
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] maochongxin commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
maochongxin commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1362639107
> > I've finished, help code review @Gabriel39
>
> Some bugs are fixed in master branch recently but still exist in your dev branch. Could you rebase the master branch and push again?
emmm, just used sync fork at my source repository
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #15154:
URL: https://github.com/apache/doris/pull/15154#discussion_r1053352701
##########
docs/en/docs/sql-manual/sql-functions/math-functions/round_bankers.md:
##########
@@ -0,0 +1,80 @@
+---
+{
+ "title": "round_bankers",
+ "language": "en"
+}
+---
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+## round_bankers
+
+### description
+#### Syntax
+
+`round_bankers(x), round_bankers(x, d)`
+Rounds the argument `x` to `d` specified decimal places. `d` defaults to 0 if not specified. If d is negative, the left d digits of the decimal point are 0. If x or d is null, null is returned.
+
++ If the rounding number is halfway between two numbers, the function uses banker’s rounding.
++ In other cases, the function rounds numbers to the nearest integer.
+
+
+
+### example
+
+```
+mysql> select round_bankers(0.4);
++--------------------+
+| round_bankers(0.4) |
++--------------------+
+| 0 |
++--------------------+
+mysql> select round_bankers(-3.5);
++---------------------+
+| round_bankers(-3.5) |
++---------------------+
+| -4 |
++---------------------+
+mysql> select round_bankers(-3.4);
++---------------------+
+| round_bankers(-3.4) |
++---------------------+
+| -3 |
++---------------------+
+mysql> select round_bankers(10.755, 2);
++--------------------------+
+| round_bankers(10.755, 2) |
++--------------------------+
+| 10.76 |
++--------------------------+
+mysql> select round_bankers(1667.2725, 2);
++-----------------------------+
+| round_bankers(1667.2725, 2) |
++-----------------------------+
+| 1667.27 |
++-----------------------------+
+mysql> select round_bankers(1667.2725, -2);
++------------------------------+
+| round_bankers(1667.2725, -2) |
++------------------------------+
+| 1700 |
++------------------------------+
+```
+
+### keywords
+ ROUNDBANKERS
Review Comment:
round_bankers
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1356277719
clang-tidy review says "All clean, LGTM! :+1:"
--
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] maochongxin commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
maochongxin commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1359384612
> > I am currently using mysql-client to connect to fe locally, but I cannot use round_bankers. I am looking into this problem, and can you reproduce it?
>
> I think you forget to register this function in FE's FunctionSet. You can add it in gensrc/script/doris_builtin_functions.py just like function round.
>
> Btw, you'd better to add a SQL-like regression test case in folder regression/suites
That's right!! I did trace the code and found that `getBuiltinFunction` returned `nil`, so it was registered through here, thank you very much! And I will complete the test cases as soon as possible
--
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] maochongxin commented on pull request #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
maochongxin commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1359370586
> Do you still want to update this PR? If not, maybe you should make this PR ready for review
I am currently using mysql-client to connect to fe locally, but I cannot use round_bankers. I am looking into this problem, and can you reproduce it?
--
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 #15154: [Feature] Support function roundBankers
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #15154:
URL: https://github.com/apache/doris/pull/15154#issuecomment-1361873239
clang-tidy review says "All clean, LGTM! :+1:"
--
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