Skip to content

[Feature](func) Support function PREVIOUS_DAY#3390

Merged
zclllyybb merged 2 commits intoapache:masterfrom
linrrzqqq:previoud_day
Feb 15, 2026
Merged

[Feature](func) Support function PREVIOUS_DAY#3390
zclllyybb merged 2 commits intoapache:masterfrom
linrrzqqq:previoud_day

Conversation

@linrrzqqq
Copy link
Contributor

@linrrzqqq linrrzqqq commented Feb 11, 2026

Versions

  • dev
  • 4.x
  • 3.x
  • 2.1

Languages

  • Chinese
  • English

Docs Checklist

  • Checked by AI
  • Test Cases Built

@linrrzqqq linrrzqqq requested a review from zclllyybb as a code owner February 11, 2026 09:53
yiguolei pushed a commit to apache/doris that referenced this pull request Feb 12, 2026
### 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 bot pushed a commit to apache/doris that referenced this pull request Feb 12, 2026
### 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 -->
@zclllyybb zclllyybb merged commit 3223c0b into apache:master Feb 15, 2026
1 check passed
@linrrzqqq linrrzqqq deleted the previoud_day branch February 15, 2026 18:33
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.

2 participants