Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jan 7, 2026

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>
@github-actions github-actions bot requested a review from yiguolei as a code owner January 7, 2026 17:43
@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 closed this Jan 7, 2026
@dataroaring dataroaring reopened this Jan 7, 2026
@hello-stephen
Copy link
Contributor

run buildall

@hello-stephen
Copy link
Contributor

BE UT Coverage Report

Increment line coverage 15.28% (11/72) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.27% (18678/35062)
Line Coverage 39.03% (172652/442309)
Region Coverage 33.74% (133553/395781)
Branch Coverage 34.74% (57791/166357)

@yiguolei
Copy link
Contributor

yiguolei commented Jan 8, 2026

skip buildall

@yiguolei yiguolei merged commit 3f651d0 into branch-4.0 Jan 8, 2026
27 of 30 checks passed
@github-actions github-actions bot deleted the auto-pick-58885-branch-4.0 branch January 8, 2026 06:11
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