Skip to content

Conversation

@zhangstar333
Copy link
Contributor

Proposed changes

cherry-pick from #38001

…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
```
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@zhangstar333
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.45% (9238/25345)
Line Coverage: 27.98% (75519/269857)
Region Coverage: 26.80% (38819/144856)
Branch Coverage: 23.55% (19718/83734)
Coverage Report: http://coverage.selectdb-in.cc/coverage/8ce38b7f9c0f708723764961e7550516a6deebfc_8ce38b7f9c0f708723764961e7550516a6deebfc/report/index.html

@yiguolei yiguolei merged commit 70cde39 into apache:branch-2.1 Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants