Skip to content

Conversation

zclllyybb
Copy link
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
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
Contributor Author

run buildall

@doris-robot
Copy link

BE UT Coverage Report

Increment line coverage 0.00% (0/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 42.09% (11243/26712)
Line Coverage 32.62% (96243/295079)
Region Coverage 30.55% (55262/180893)
Branch Coverage 26.88% (27358/101782)

@hello-stephen
Copy link
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100.00% (4/4) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.21% (19710/26205)
Line Coverage 68.46% (201120/293764)
Region Coverage 66.48% (120328/180997)
Branch Coverage 59.80% (61063/102106)

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