Skip to content

branch-4.0: [Feature](func) Support function PREVIOUS_DAY #60680#60726

Merged
yiguolei merged 1 commit intobranch-4.0from
auto-pick-60680-branch-4.0
Feb 13, 2026
Merged

branch-4.0: [Feature](func) Support function PREVIOUS_DAY #60680#60726
yiguolei merged 1 commit intobranch-4.0from
auto-pick-60680-branch-4.0

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #60680

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: 

### Release note

doc: apache/doris-website#3390

Given an input date value, return the date of the day of the week before
it.
```text
Doris> select previous_day('2023-04-06', 'Monday');
+--------------------------------------+
| previous_day('2023-04-06', 'Monday') |
+--------------------------------------+
| 2023-04-03                           |
+--------------------------------------+
1 row in set (0.13 sec)

Doris> select previous_day('2023-04-06', 'Tue');
+-----------------------------------+
| previous_day('2023-04-06', 'Tue') |
+-----------------------------------+
| 2023-04-04                        |
+-----------------------------------+
1 row in set (0.04 sec)

Doris> select previous_day('2023-04-06 20:13:14', 'Fr');
+-------------------------------------------+
| previous_day('2023-04-06 20:13:14', 'Fr') |
+-------------------------------------------+
| 2023-03-31                                |
+-------------------------------------------+
1 row in set (0.04 sec)
```

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [ ] Unit Test
    - [ ] Manual test (add detailed scripts or steps below)
    - [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
        - [ ] Previous test can cover this change.
        - [ ] No code files have been changed.
        - [ ] Other reason <!-- Add your reason?  -->

- Behavior changed:
    - [ ] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [ ] No.
    - [x] Yes. apache/doris-website#3390

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
@github-actions github-actions bot requested a review from yiguolei as a code owner February 12, 2026 15:57
@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?

@dataroaring dataroaring reopened this Feb 12, 2026
@hello-stephen
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 8.33% (1/12) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 100.00% (9/9) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.99% (19102/36051)
Line Coverage 36.15% (177813/491816)
Region Coverage 32.73% (137652/420632)
Branch Coverage 33.67% (59722/177373)

@yiguolei
Copy link
Contributor

skip buildall

@yiguolei yiguolei merged commit 0ae9ed2 into branch-4.0 Feb 13, 2026
28 of 31 checks passed
@github-actions github-actions bot deleted the auto-pick-60680-branch-4.0 branch February 13, 2026 01:56
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 13, 2026
@github-actions
Copy link
Contributor Author

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Contributor Author

PR approved by anyone and no changes requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants