Commit Graph

1545 Commits

Author SHA1 Message Date
8869783458 branch-2.1: [fix](be) core dump because of invalid bitmap data #53088 (#53935)
Cherry-picked from #53088

Co-authored-by: JinYang <130516674+gohalo@users.noreply.github.com>
2025-07-27 07:54:23 +08:00
101ea8434b [Cherry-Pick](branch-2.1) Pick "[Fix](core) Fix null ptr introduced by #42949 (#46074)" (#53865) 2025-07-26 22:48:03 +08:00
fac42370c9 [branch-21](upgrate) fix upgrate error of branch-21 (#53353) 2025-07-21 12:08:48 +08:00
e8d18788f6 branch-2.1:[fix](function)fix month=0 of from_iso8601_date function. (#53050) (#53438)
bp #53050
Related PR: #40695
Problem Summary:

pr #40695 introduced the function `from_iso8601_date`, which parses the
string to get year、mouth、 day, and sets the date value through the
`set_time_unit` function.
Since `set_time_unit` lacks some judgment on mouth, it may get an
illegal date in the end, which may cause core in debug mode.

sql : `select from_iso8601_date('2023-00-01');`
```
F20250709 09:50:14.366984 3587796 vdatetime_value.h:1222] Check failed: date_v2_value_.month_ != 0
*** Check failure stack trace: ***
    @     0x559bd7050d96  google::LogMessage::SendToLog()
    @     0x559bd704d7e0  google::LogMessage::Flush()
    @     0x559bd70515d9  google::LogMessageFatal::~LogMessageFatal()
    @     0x559bc725a570  doris::DateV2Value<>::set_time_unit<>()
    @     0x559bc7257380  doris::vectorized::FromIso8601DateV2::execute()
    @     0x559bc7255a88  doris::vectorized::FunctionOtherTypesToDateType<>::execute_impl()
    @     0x559bc09e0781  doris::vectorized::DefaultExecutable::execute_impl()
    @     0x559bc423aa20  doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal()
    @     0x559bc4234938  doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns()
    @     0x559bc4233f42  doris::vectorized::PreparedFunctionImpl::default_implementation_for_nulls()
    @     0x559bc423a773  doris::vectorized::PreparedFunctionImpl::_execute_skipped_constant_deal()
    @     0x559bc4234938  doris::vectorized::PreparedFunctionImpl::execute_without_low_cardinality_columns()
    @     0x559bc4234a57  doris::vectorized::PreparedFunctionImpl::execute()
```

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

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.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### 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 -->
2025-07-18 14:43:11 +08:00
3c38843e0d [Bug](branch-21) fix the compatibility cause coredump during upgrade (#52720)
### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:
the PR https://github.com/apache/doris/pull/50310 introduce,
shouldn't change the be version in branch-21, others before
compatibility code will be error


### Release note

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.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### 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 -->
2025-07-09 11:00:10 +08:00
560097e491 branch-2.1: [Opt](mow) Move DeleteBitmapAggCache to ExecEnv (#52649) (#52738)
pick https://github.com/apache/doris/pull/52649
2025-07-09 10:59:19 +08:00
6404277795 [fix](json) Add . after in JSON path to support correct token parsing (#52543) (#52544)
Boost tokenizer requires explicit "." after "$" to correctly extract
JSON path tokens. Without this, expressions like "$[0].key" cannot be
properly split, causing issues in downstream logic. This commit ensures
a "." is automatically added after "$" to maintain consistent token
parsing behavior.
2025-07-03 14:36:53 +08:00
fb70742e87 branch-2.1: [Fix](field) Fix potential memory leak and wrong binary reading about JsonbField (#50174) (#52693)
pick https://github.com/apache/doris/pull/50174
2025-07-03 12:38:37 +08:00
a75760d18f brach-2.1 cherry-pick [Fix](Variant) fix serialize with json key contains . as name (#51864)
cherry-pick from #51857
2025-06-20 14:00:00 +08:00
1ae039e4ae [test](jsonb) Add test case for Jsonb format (#51876)
### What problem does this PR solve?

This PR introduces a UT to prevent unintended changes to the Jsonb
format.

The Jsonb format is a stable data contract and should not be changed
lightly, as it may break backward compatibility or affect persisted
data.

Changes
1. Added a dedicated test case that verifies the binary output of
serialized Jsonb data.
2. The test includes hardcoded reference strings and binary blobs as
golden values to validate serialization output.
3. This ensures any modification to the format will be caught early
during development or code review.

Notes
• Developers should not remove or modify this test without a thorough
review and a strong justification.
• If the serialization format must change, please update the test
accordingly and ensure compatibility is preserved.

Related PR: #xxx

Problem Summary:

### Release note

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.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### 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 -->
2025-06-19 11:06:05 +08:00
18d2f93120 branch-2.1: [fix](function) JSON_EXTRACT_STRING should return NULL instead of the string 'null' when encountering a NULL value #51516 (#51566)
Cherry-picked from #51516

---------

Co-authored-by: Jerry Hu <hushenggang@selectdb.com>
2025-06-13 11:07:31 +08:00
a836df5d53 branch-2.1: [fix](decimal)Fix the issue where decimal multiplication produces incorrect results due to mul_overflow error #51533 (#51563)
Cherry-picked from #51533

Co-authored-by: Mryange <2319153948@qq.com>
2025-06-07 20:28:29 +08:00
505c9af95a [fix](inverted index) fix query error (#50860) (#50909)
pick from master #50860
2025-05-17 16:19:15 +08:00
0f50cea3d8 branch-2.1: [fix](memory) Fix PODArray::add_num_element (#50785)
pick #50756
2025-05-11 19:14:25 +08:00
0002500757 branch-2.1: [Fix](inverted index) fix rename column build index bug #50056 (#50732)
pick #47562 #50056 from master

---------

Co-authored-by: qiye <luen@selectdb.com>
2025-05-09 17:13:46 +08:00
5501e130bf [fix](parquet)Fixed the problem that when Parquert reader use index to read files, there will be multiple threads modify same object (#50161) (#50496)
bp #50161
2025-05-08 15:51:25 +08:00
ebcec779ec branch-2.1: [fix](function) fix error result when input utf8 in url_encode, strright, append_trailing_char_if_absent #49127 (#50660)
…ght, append_trailing_char_if_absent (#49127)

The url_encode function previously performed a modulus operation on a
signed number. Converting it to an unsigned number will fix the issue.
```
before
mysql> select url_encode('编码');
+----------------------+
| url_encode('编码')   |
+----------------------+
| %5.%23%0-%5.%10%/(   |
+----------------------+
now
mysql> select url_encode('编码');
+----------------------+
| url_encode('编码')   |
+----------------------+
| %E7%BC%96%E7%A0%81   |
+----------------------+
```

The strright function did not calculate the length according to the
number of UTF-8 characters.
```
before
mysql> select strright("你好世界",5);
+----------------------------+
| strright("你好世界",5)     |
+----------------------------+
|                            |
+----------------------------+
now

mysql> select strright("你好世界",5);
+----------------------------+
| strright("你好世界",5)     |
+----------------------------+
| 你好世界                   |
+----------------------------+
```

he case of inputting a UTF-8 character was not considered.
```
mysql> select append_trailing_char_if_absent('中文', '文');
+-------------------------------------------------+
| append_trailing_char_if_absent('中文', '文')    |
+-------------------------------------------------+
| NULL                                            |
+-------------------------------------------------+
now
mysql> select append_trailing_char_if_absent('中文', '文');
+-------------------------------------------------+
| append_trailing_char_if_absent('中文', '文')    |
+-------------------------------------------------+
| 中文                                            |
+-------------------------------------------------+
```
2025-05-07 22:37:50 +08:00
02c3157e4c [branch-2.1](function) fix wrong floor of function date_diff when unit less than day (#49429) (#50606)
pick https://github.com/apache/doris/pull/49429
2025-05-07 09:27:37 +08:00
af4195e399 branch-2.1: [fix](geo) Fix ST_Contains behavior #50115 (#50569)
Cherry-picked from #50115

Co-authored-by: linrrarity <142187136+linrrzqqq@users.noreply.github.com>
2025-05-03 22:36:22 +08:00
4b3dd6c10a branch-2.1: [feat](func) any function supports json #50311 (#50484)
Cherry-picked from #50311

Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
2025-04-29 19:11:25 +08:00
3660139c64 branch-2.1: [fix](path gc) Fix path gc race with publish task #50343 (#50520)
cherry pick from #50343
2025-04-29 16:17:34 +08:00
4e8148105a [fix](serde)Fixed the issue that serde may cause be core when reading schema changed text table. (#50105) (#50504)
bp #50105
2025-04-28 21:54:43 -07:00
bc68a8da07 branch-2.1: remove visible rowset from memory during deletion transaction (#50329) 2025-04-24 09:41:37 +08:00
cf72fa82e2 [Improve](explode) explode function support multi param (#50310)
### What problem does this PR solve?
backport:https://github.com/apache/doris/pull/48537
Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

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.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### 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 -->
2025-04-23 23:27:07 +08:00
ea29bc523e branch-2.1: [Enhancement](GEO) Support Multipolygon and some spatial functions (#50073)
pick: https://github.com/apache/doris/pull/37003,
https://github.com/apache/doris/pull/48695 and
https://github.com/apache/doris/pull/49665

---------

Co-authored-by: Mryange <59914473+Mryange@users.noreply.github.com>
Co-authored-by: koi <koi20000@163.com>
2025-04-17 09:25:29 +08:00
aa4b54952c branch-2.1: [enhancement]Optimize GeoFunctions for const columns #34396 (#50067)
Cherry-picked from #34396

Co-authored-by: koarz <66543806+koarz@users.noreply.github.com>
2025-04-16 14:05:46 +08:00
fe634555bd [fix](variant)fix core in column_object when sort from empty block (#50035) 2025-04-16 14:03:04 +08:00
6e448d3a56 [feat](test)add some be ut for orc/parquet reader (#49418) (#49948)
bp #49418
2025-04-16 12:38:45 +08:00
d8a274251e branch-2.1: [feature](function) support utf8 input in initcap #49846 (#49977) 2025-04-11 15:06:23 +08:00
8199febcdb [Test][Fix](parquet-reader) Add parquet decoder unit tests and fix bugs by these tests. (#49922) 2025-04-10 21:56:53 +08:00
aad189cf40 [feature](function) upper lower support utf8 input (#49756)
### What problem does this PR solve?
https://github.com/apache/doris/pull/49231
2025-04-07 12:00:31 +08:00
c0bc16d88f [fix](function) wrong result of arrays_overlap (#49403) (#49707)
Pick #49403
If the two arrays have the same non-null elements, they are considered
overlapping, and the result is 1.
If the two arrays have no common non-null elements and either array
contains a null element, the result is null.
Otherwise, the result is 0.

```
select arrays_overlap([1, 2, 3], [1, null]);  -- result should be 1

select arrays_overlap([2, 3], [1, null]);  -- result should be null

select arrays_overlap([2, 3], [1]);   -- result should be 0
```

### What problem does this PR solve?
2025-04-04 20:58:01 +08:00
145e393d3d branch-2.1: [fix](function) check return type is nullptr in FunctionBasePtr::build #49737 (#49761) 2025-04-02 20:23:41 +08:00
1259ee5088 branch-2.1: [Feature](function) support year of week #48870 (#49012) 2025-03-29 11:24:45 +08:00
4a31fc4e09 [Bug](fix) fix the percentile func result do not equal the percentile array rewrite result (#49379)
cherry pick https://github.com/apache/doris/pull/49351
2025-03-29 08:56:24 +08:00
ce49f37a5e branch-2.1: [fix](core) fix subreplace when inputting a large number of empty strings #49241 (#49303)
Cherry-picked from #49241

Co-authored-by: Mryange <yanxuecheng@selectdb.com>
2025-03-20 22:56:44 +08:00
8f79742f7d branch-2.1: [fix](arrow) Fix Arrow serialization and deserialization of Date/Datetime/Array/Map/Struct/Bitmap/HLL/Decimal256 types (#49244)
### What problem does this PR solve?

pick #48944 [fix](arrow) Fix UT DataTypeSerDeArrowTest of
Array/Map/Struct/Bitmap/HLL/Decimal256 types
pick #48398  [fix](arrow) Fix UT DataTypeSerDeArrowTest of Date type
2025-03-20 09:57:04 +08:00
f771a422a9 branch-2.1: [fix](column) fix ColumnWithTypeAndName::get_nested use-after-free when input Const(Nullable) column #48288 (#49258) 2025-03-20 09:53:20 +08:00
3b61f840f4 [fix](function) Undefined behavior in parse_url (#49149) (#49226) 2025-03-19 17:32:47 +08:00
e5a2b0eea8 Revert "[cherry-pick](jsonb) add a check for jsonb value to avoid invalid jsonb value write into segment file " (#49058)
Reverts apache/doris#48729
temp revert this pr for
PartialUpdateInfo::_generate_default_values_for_missing_cids using empty
string , which will make this check fail.
2025-03-14 17:41:06 +08:00
ad6cf63a28 branch-2.1: [opt](inverted index) uniform profile naming convention #48826 (#48975)
Cherry-picked from #48826

Co-authored-by: zzzxl <yangsiyu@selectdb.com>
2025-03-14 14:04:46 +08:00
ed2e1ac34a branch-2.1: [fix](variant) update least common type in ColumnObject::pop_back #48935 (#48979)
Cherry-picked from #48935

Co-authored-by: Sun Chenyang <sunchenyang@selectdb.com>
2025-03-13 17:41:17 +08:00
e455bceb91 [fix](function) fix error result when STR_TO_DATE input all space (#4… (#48920)
…8872)
https://github.com/apache/doris/pull/48872
before
```
mysql> select STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s');
+-----------------------------------------+
| STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s') |
+-----------------------------------------+
|                                         |
+-----------------------------------------+
```
now
```
mysql> select STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s');
+-----------------------------------------+
| STR_TO_DATE ('  ', '%Y-%m-%d %H:%i:%s') |
+-----------------------------------------+
| NULL                                    |
+-----------------------------------------+
```

Problem Summary:

None

- Test <!-- At least one of them must be included. -->
    - [x] Regression test
    - [x] 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:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

### Release note

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.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->

### 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 -->
2025-03-11 19:30:38 +08:00
3f684f2899 branch-2.1:[fix] (inverted index) Fix UTF-8 4-byte truncation issue and add configuration to control correct term writing (#48657) (#48741)
Cherry-picked from #48657
2025-03-06 21:28:24 +08:00
7b2899a7ff [cherry-pick](jsonb) add a check for jsonb value to avoid invalid jsonb value write into segment file (#48729)
…ke select core (#48625)

fix invalid jsonb value write into segment file which make select core,
so we add a check for jsonb value when convert_to_olap which value will
be written into segment file
2025-03-06 15:50:35 +08:00
621944d487 [InvertedIndex](Variant) supoort inverted index for array type in variant (#48594)
cherry-pick from #47688
2025-03-05 10:02:13 +08:00
08e7d920db branch-2.1: [fix](index build) Correct inverted index behavior after dynamically adding a column #48389 (#48546)
Cherry-picked from #48389

---------

Co-authored-by: airborne12 <jiangkai@selectdb.com>
2025-03-05 09:26:54 +08:00
cd3e1dce74 [feature](inverted index) Add profile statistics for each condition in inverted index filters (#48459)
https://github.com/apache/doris/pull/47504
2025-03-01 11:00:19 +08:00
1aa57a3b13 branch-2.1: [fix](array index) Correct null bitmap writing for inverted index #47846 (#48214)
cherry pick from #47846 #48231
2025-02-25 20:31:18 +08:00
470030b878 [feat](clone) Speed clone tablet via batch small file downloading #45061 (#45218)
cherry pick from #45061
2025-02-10 19:38:40 +08:00