Skip to content

[Feature](func) Support function PREVIOUS_DAY#3390

Open
linrrzqqq wants to merge 2 commits intoapache:masterfrom
linrrzqqq:previoud_day
Open

[Feature](func) Support function PREVIOUS_DAY#3390
linrrzqqq wants to merge 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 -->
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.

1 participant