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/10/17 13:12:09 UTC
[GitHub] [doris] luozenglin opened a new pull request, #13426: [fix](year) fix `year()` results are not as expected
luozenglin opened a new pull request, #13426:
URL: https://github.com/apache/doris/pull/13426
# Proposed changes
Issue Number: close #13425
## Problem summary
Describe your changes.
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [x] No
- [ ] I don't know
2. Has unit tests been added:
- [ ] Yes
- [ ] No
- [x] No Need
3. Has document been added or modified:
- [ ] Yes
- [ ] No
- [x] 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] Gabriel39 commented on a diff in pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
Gabriel39 commented on code in PR #13426:
URL: https://github.com/apache/doris/pull/13426#discussion_r997667871
##########
be/src/vec/functions/date_time_transforms.h:
##########
@@ -308,7 +308,7 @@ struct Transformer<FromType, ToType, ToYearImpl<FromType>> {
}
for (size_t i = 0; i < size; ++i) {
- null_map_ptr[i] = to_ptr[i] <= MIN_YEAR || to_ptr[i] >= MAX_YEAR;
Review Comment:
This checking rule also should be same as FE. Could you add some cases for FE `year` function?
--
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] BiteTheDDDDt commented on a diff in pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on code in PR #13426:
URL: https://github.com/apache/doris/pull/13426#discussion_r997653306
##########
be/src/vec/functions/date_time_transforms.h:
##########
@@ -308,7 +308,7 @@ struct Transformer<FromType, ToType, ToYearImpl<FromType>> {
}
for (size_t i = 0; i < size; ++i) {
- null_map_ptr[i] = to_ptr[i] <= MIN_YEAR || to_ptr[i] >= MAX_YEAR;
+ null_map_ptr[i] = to_ptr[i] < MIN_YEAR || to_ptr[i] > MAX_YEAR;
Review Comment:
year is unsigned type, we can remove year<0
--
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] luozenglin commented on a diff in pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
luozenglin commented on code in PR #13426:
URL: https://github.com/apache/doris/pull/13426#discussion_r998066120
##########
be/src/vec/functions/date_time_transforms.h:
##########
@@ -308,7 +308,7 @@ struct Transformer<FromType, ToType, ToYearImpl<FromType>> {
}
for (size_t i = 0; i < size; ++i) {
- null_map_ptr[i] = to_ptr[i] <= MIN_YEAR || to_ptr[i] >= MAX_YEAR;
Review Comment:
Fe does not have this problem
--
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] BiteTheDDDDt commented on pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt commented on PR #13426:
URL: https://github.com/apache/doris/pull/13426#issuecomment-1283366925
introduced by #13362
--
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 #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13426:
URL: https://github.com/apache/doris/pull/13426#issuecomment-1283326207
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] github-actions[bot] commented on pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13426:
URL: https://github.com/apache/doris/pull/13426#issuecomment-1283326165
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] luozenglin commented on a diff in pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
luozenglin commented on code in PR #13426:
URL: https://github.com/apache/doris/pull/13426#discussion_r997666675
##########
be/src/vec/functions/date_time_transforms.h:
##########
@@ -308,7 +308,7 @@ struct Transformer<FromType, ToType, ToYearImpl<FromType>> {
}
for (size_t i = 0; i < size; ++i) {
- null_map_ptr[i] = to_ptr[i] <= MIN_YEAR || to_ptr[i] >= MAX_YEAR;
+ null_map_ptr[i] = to_ptr[i] < MIN_YEAR || to_ptr[i] > MAX_YEAR;
Review Comment:
done
--
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] BiteTheDDDDt merged pull request #13426: [fix](year) fix `year()` results are not as expected
Posted by GitBox <gi...@apache.org>.
BiteTheDDDDt merged PR #13426:
URL: https://github.com/apache/doris/pull/13426
--
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