[fix](variant) fix batch insert into with structure-conflicts strings#53923
Merged
eldenmoon merged 4 commits intoapache:masterfrom Jul 29, 2025
Merged
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 33614 ms |
TPC-DS: Total hot run time: 186665 ms |
ClickBench: Total hot run time: 32.03 s |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
Author
|
run buildall |
eldenmoon
reviewed
Jul 28, 2025
be/src/vec/json/parse2column.cpp
Outdated
Member
There was a problem hiding this comment.
only check when enable_nested
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 33816 ms |
TPC-DS: Total hot run time: 170919 ms |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
Author
|
run performance |
1 similar comment
Contributor
Author
|
run performance |
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
amorynan
pushed a commit
to amorynan/doris
that referenced
this pull request
Jul 29, 2025
…apache#53923) fix batch insert into with structure-conflicts strings Before this we were able to successfully insert, but will meet query error like this: ``` mysql> insert into var_nested_load_conflict values (3, '{"nested": [{"a": 2.5, "b": "123.1"}]}'), (4, '{"nested": {"a": 2.5, "b": "123.1"}}'); Query OK, 2 rows affected (0.16 sec) {'label':'label_9279242ae3fd40e2_aabe077db2d37bb9', 'status':'VISIBLE', 'txnId':'16028'} mysql> desc var_nested_load_conflict; +------------+---------------+------+-------+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+---------------+------+-------+---------+-------+ | k | bigint | Yes | true | NULL | | | v | variant | Yes | false | NULL | NONE | | v.nested.a | json | Yes | false | NULL | NONE | | v.nested.b | json | Yes | false | NULL | NONE | | v.nested.c | array<double> | Yes | false | NULL | NONE | +------------+---------------+------+-------+---------+-------+ 5 rows in set (0.10 sec) mysql> select * from var_nested_load_conflict; ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.6)[INTERNAL_ERROR]Meet none array column when flatten nested array, path nested.b, type Nullable(JSONB) ``` So we don't allow this kind of insertion ``` mysql> insert into var_nested_load_conflict values (3, '{"nested": [{"a": 2.5, "b": "123.1"}]}'), (4, '{"nested": {"a": 2.5, "b": "123.1"}}'); ERROR 1105 (HY000): errCode = 2, detailMessage = (10.16.10.6)[DATA_QUALITY_ERROR][E46] Ambiguous paths: nested.b vs nested.b with different nested part false vs true ```
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
fix batch insert into with structure-conflicts strings
Before this we were able to successfully insert, but will meet query error
like this:
So we don't allow this kind of insertion
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)