Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #57347

…MP with precision (#57347)

### Release note
1. Support `UTC_TIMESTAMP` with precision
```text
mysql> SELECT UTC_TIMESTAMP(5), UTC_TIMESTAMP(5) + 1;
+---------------------------+----------------------+
| UTC_TIMESTAMP(5)          | UTC_TIMESTAMP(5) + 1 |
+---------------------------+----------------------+
| 2025-10-27 06:38:34.45620 |       20251027063835 |
+---------------------------+----------------------+

mysql> SELECT UTC_TIMESTAMP(7);
ERROR 1105 (HY000): errCode = 2, detailMessage = scale must be between 0 and 6
```

2. Support `UTC_DATE` and `UTC_TIME`
```text
mysql> SELECT UTC_TIME(), UTC_TIME() + 1, UTC_TIME(6), UTC_TIME(6) + 1;
------------+----------------+-----------------+-----------------+
| UTC_TIME() | UTC_TIME() + 1 | UTC_TIME(6)     | UTC_TIME(6) + 1 |
+------------+----------------+-----------------+-----------------+
| 06:39:01   |    23941000001 | 06:39:01.934119 |     23941934120 |
+------------+----------------+-----------------+-----------------+

mysql> SELECT UTC_TIME(7);
ERROR 1105 (HY000): errCode = 2, detailMessage = scale must be between 0 and 6

mysql> SELECT UTC_DATE();
+------------+
| UTC_DATE() |
+------------+
| 2025-10-27 |
+------------+
```
@github-actions github-actions bot requested a review from yiguolei as a code owner October 29, 2025 04:24
@Thearas
Copy link
Contributor

Thearas commented Oct 29, 2025

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?

@dataroaring dataroaring reopened this Oct 29, 2025
@Thearas
Copy link
Contributor

Thearas commented Oct 29, 2025

run buildall

@yiguolei yiguolei merged commit 88cc1d4 into branch-4.0 Oct 31, 2025
22 of 26 checks passed
@github-actions github-actions bot deleted the auto-pick-57347-branch-4.0 branch October 31, 2025 01:39
@yiguolei yiguolei mentioned this pull request Nov 5, 2025
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.

5 participants