Uh oh!
There was an error while loading. Please reload this page.
[bug](function) fix conv function get wrong result as parse overflow - #38001
Merged
Conversation
doris-robot
commented
Jul 17, 2024
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
zhangstar333
commented
Jul 17, 2024
ContributorAuthor
run buildall |
Contributor
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jul 17, 2024
TPC-H: Total hot run time: 39869 ms |
doris-robot
commented
Jul 17, 2024
TPC-DS: Total hot run time: 173013 ms |
doris-robot
commented
Jul 17, 2024
ClickBench: Total hot run time: 30.51 s |
zhangstar333
commented
Jul 18, 2024
ContributorAuthor
run buildall |
Contributor
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jul 18, 2024
TPC-H: Total hot run time: 39789 ms |
doris-robot
commented
Jul 18, 2024
TPC-DS: Total hot run time: 173863 ms |
doris-robot
commented
Jul 18, 2024
ClickBench: Total hot run time: 30.42 s |
zclllyybb
approved these changes
Jul 23, 2024
zclllyybb
left a comment
Contributor
There was a problem hiding this comment.
LGTM. please also raise a pr to docs to clarify the function behaviour
Contributor
PR approved by anyone and no changes requested. |
zhangstar333
commented
Jul 23, 2024
ContributorAuthor
run buildall |
Contributor
clang-tidy review says "All clean, LGTM! 👍" |
doris-robot
commented
Jul 23, 2024
TPC-H: Total hot run time: 40026 ms |
doris-robot
commented
Jul 23, 2024
TPC-DS: Total hot run time: 174250 ms |
doris-robot
commented
Jul 23, 2024
ClickBench: Total hot run time: 29.8 s |
Contributor
PR approved by at least one committer and no changes requested. |
zhangstar333 added a commit
to zhangstar333/incubator-doris
that referenced
this pull request
Jul 24, 2024
…pache#38001) ``` mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1111111111111111111111111111111111111111111111111111111111111111 | +------------------------------------------------------------------+ before get wrong result as 'ffffffffffffff' have beyond the max value of int64, so get max value: std::numeric_limits<int64_t>::max() mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1011111001100011011111100110111101001101111010011011110100110111 | +------------------------------------------------------------------+ now change it to parse as uint64_t could get result. But if the value is still overflow, will get max value of uint64_t ```
dataroaring pushed a commit
that referenced
this pull request
Jul 24, 2024
…38001) ``` mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1111111111111111111111111111111111111111111111111111111111111111 | +------------------------------------------------------------------+ before get wrong result as 'ffffffffffffff' have beyond the max value of int64, so get max value: std::numeric_limits<int64_t>::max() mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1011111001100011011111100110111101001101111010011011110100110111 | +------------------------------------------------------------------+ now change it to parse as uint64_t could get result. But if the value is still overflow, will get max value of uint64_t ```
Closed
HappenLee pushed a commit
to HappenLee/incubator-doris
that referenced
this pull request
Apr 24, 2026
…pache#38001) ``` mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1111111111111111111111111111111111111111111111111111111111111111 | +------------------------------------------------------------------+ before get wrong result as 'ffffffffffffff' have beyond the max value of int64, so get max value: std::numeric_limits<int64_t>::max() mysql> select conv('ffffffffffffff', 24, 2); +------------------------------------------------------------------+ | conv('ffffffffffffff', 24, 2) | +------------------------------------------------------------------+ | 1011111001100011011111100110111101001101111010011011110100110111 | +------------------------------------------------------------------+ now change it to parse as uint64_t could get result. But if the value is still overflow, will get max value of uint64_t ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes