Skip to content

branch-3.0: [Fix](function) Fix wrong decimal of unix_timestamp (#55013) - #55961

Closed
zclllyybb wants to merge 1 commit into
apache:branch-3.0from
zclllyybb:wrong_decimal_unixtimestamp_30
Closed

branch-3.0: [Fix](function) Fix wrong decimal of unix_timestamp (#55013)#55961
zclllyybb wants to merge 1 commit into
apache:branch-3.0from
zclllyybb:wrong_decimal_unixtimestamp_30

Conversation

@zclllyybb

Copy link
Copy Markdown
Contributor

pick #55013

when the input datetime has decimal part start with zero, the result was
wrong before. now fixed.
before:
```sql
mysql> select UNIX_TIMESTAMP('2015-11-13 10:20:19.012');
+-------------------------------------------+
| UNIX_TIMESTAMP('2015-11-13 10:20:19.012') |
+-------------------------------------------+
| 1447381219.120 |
+-------------------------------------------+
```
now:
```sql
mysql> select UNIX_TIMESTAMP('2015-11-13 10:20:19.012');
+-------------------------------------------+
| UNIX_TIMESTAMP('2015-11-13 10:20:19.012') |
+-------------------------------------------+
| 1447381219.012 |
+-------------------------------------------+
```
@hello-stephen

Copy link
Copy Markdown
Contributor

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

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@zclllyybb

Copy link
Copy Markdown
ContributorAuthor

run buildall

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 0.00% (0/4) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage42.09% (11243/26712)
Line Coverage32.62% (96243/295079)
Region Coverage30.55% (55262/180893)
Branch Coverage26.88% (27358/101782)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (4/4) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage75.21% (19710/26205)
Line Coverage68.46% (201120/293764)
Region Coverage66.48% (120328/180997)
Branch Coverage59.80% (61063/102106)

Sign up for freeto 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

@zclllyybb@hello-stephen@doris-robot