Skip to content

branch-4.0: [Feature](func) Support INTERVAL function and fix EXPORT_SET constant process #58885 - #59655

Merged
yiguolei merged 1 commit into
branch-4.0from
auto-pick-58885-branch-4.0
Jan 8, 2026
Merged

branch-4.0: [Feature](func) Support INTERVAL function and fix EXPORT_SET constant process #58885#59655
yiguolei merged 1 commit into
branch-4.0from
auto-pick-58885-branch-4.0

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Cherry-picked from #58885

… process (#58885)
Related PR: #57569
Problem Summary:
fix the wrong useage of function `default_preprocess_parameter_columns`,
the variable `all_const` should not be affected by manually handled
columns.
### Release note
doc: apache/doris-website#3176
The INTERVAL function uses binary search to return the index of the
first threshold strictly greater than N.
```sql
SELECT INTERVAL(0, 1, 10, 100);
+--------------------------+
| INTERVAL(0, 1, 10, 100) |
+--------------------------+
| 0 |
+--------------------------+
SELECT INTERVAL(10, 1, 10, 100, 1000);
+-----------------------------------+
| INTERVAL(10, 1, 10, 100, 1000) |
+-----------------------------------+
| 2 |
+-----------------------------------+
-- First parameter is NULL
SELECT INTERVAL(NULL, 1, 10, 100);
+----------------------------+
| INTERVAL(NULL, 1, 10, 100) |
+----------------------------+
| -1 |
+----------------------------+
-- Subsequent parameters are NULL, treated as 0
SELECT INTERVAL(3, -1, NULL, 2, 3, 4);
+--------------------------------+
| INTERVAL(3, -1, NULL, 2, 3, 4) |
+--------------------------------+
| 4 |
+--------------------------------+
```
Co-authored-by: jianhao <1367919489@qq.com>
@hello-stephen

Copy link
Copy Markdown
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?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 15.28% (11/72) 🎉

Increment coverage report
Complete coverage report

CategoryCoverage
Function Coverage53.27% (18678/35062)
Line Coverage39.03% (172652/442309)
Region Coverage33.74% (133553/395781)
Branch Coverage34.74% (57791/166357)

@yiguolei

Copy link
Copy Markdown
Contributor

skip buildall

@yiguolei
yiguolei merged commit 3f651d0 into branch-4.0Jan 8, 2026
27 of 30 checks passed
@github-actions
github-actionsBot deleted the auto-pick-58885-branch-4.0 branch January 8, 2026 06:11
ybtsdst pushed a commit to ybtsdst/doris that referenced this pull request Feb 27, 2026
…SET constant process apache#58885 (apache#59655)
Cherry-picked from apache#58885
Co-authored-by: linrrarity <linzhenqi@selectdb.com>
Co-authored-by: jianhao <1367919489@qq.com>
Sign up for freeto 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.

4 participants

@hello-stephen@yiguolei@dataroaring@linrrzqqq