Skip to content

Commit 78b01b3

Browse files
MryangeYour Name
authored andcommitted
[fix](function)The json_remove function did not initialize nullmap. (#57995)
### What problem does this PR solve? This error can occur in this PR (#57909 ``` mysql> SELECT JSON_REMOVE('{"a": 1, "b": 2, "c": 3}', '\$.b'); ERROR 1105 (HY000): errCode = 2, detailMessage = (127.0.0.1)[INVALID_ARGUMENT]null map check failed for column: Const(Nullable(String)) ``` 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) - [x] No need to test or manual test. Explain why: - [x] 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: apache/doris-website#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 -->
1 parent 2dd9e3b commit 78b01b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

be/src/vec/functions/function_jsonb.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2747,7 +2747,7 @@ class FunctionJsonbRemove : public IFunction {
27472747

27482748
res_chars.reserve(input_rows_count * 64);
27492749
res_offsets.resize(input_rows_count);
2750-
null_map.resize(input_rows_count);
2750+
null_map.resize_fill(input_rows_count, 0);
27512751

27522752
// Get JSON document column
27532753
auto [json_column, json_const] =

0 commit comments

Comments
 (0)