Skip to content

[feature](be) Support flexible variant partial update#63182

Draft
eldenmoon wants to merge 1 commit into
apache:masterfrom
eldenmoon:codex/cir-18527-variant-subcolumn-update-pr-latest
Draft

[feature](be) Support flexible variant partial update#63182
eldenmoon wants to merge 1 commit into
apache:masterfrom
eldenmoon:codex/cir-18527-variant-subcolumn-update-pr-latest

Conversation

@eldenmoon
Copy link
Copy Markdown
Member

What problem does this PR solve?

Issue Number: close #48122

Related PR: N/A

Problem Summary: Allow MOW unique flexible partial update loads to patch VARIANT object paths while preserving undeclared paths, including duplicate-key batching and publish conflict replay. V1 accepts JSON object patches only and rejects root scalar/array/null values and doc-mode VARIANT columns.

Release note

MOW unique tables can use JSON flexible partial update loads to patch object fields inside VARIANT columns.

Check List (For Author)

  • Test: Unit Test and Regression test
    • build-support/clang-format.sh
    • git diff --check 058d97897f611b0bf68965d073a5888aafba9805...HEAD
    • ./build.sh --be --fe
    • ./run-be-ut.sh --run --filter='VariantUtilTest.*VariantPatch*'
    • ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d unique_with_mow_p0/flexible -s test_flexible_partial_update_variant
    • ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d unique_with_mow_p0/flexible/publish -s test_flexible_partial_update_variant_publish_conflict
    • ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d unique_with_mow_p0/flexible -s test_flexible_partial_update_restricts
    • ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d load_p0/routine_load -s test_routine_load_flexible_partial_update
    • build-support/run-clang-tidy.sh --base 058d97897f611b0bf68965d073a5888aafba9805 --build-dir be/build_Release (blocked locally by existing/toolchain include issues: stddef.h not found, types.h unmatched NOLINTEND, and BE test include resolution under the Release compile database)
  • Behavior changed: Yes. JSON flexible partial update on MOW unique tables now merges declared VARIANT object paths and preserves undeclared paths; non-object VARIANT flexible patches and doc-mode VARIANT columns are rejected in v1.
  • Does this need documentation: No

@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?

@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed the actual GitHub PR diff and did not find a blocking issue.\n\nCritical checkpoint conclusions:\n- Goal/test coverage: the PR enables flexible partial update for VARIANT columns and adds BE unit tests plus regression coverage for object patch merge, invalid patch values, doc-mode rejection, same-batch sequence behavior, and publish conflicts.\n- Scope/focus: the actual PR diff is focused on VARIANT flexible partial update support and related FE validation/tests.\n- Concurrency/lifecycle: publish-conflict handling remains in the existing MoW publish/read-plan flow; I did not find a new lock-order or lifecycle issue in the changed paths.\n- Compatibility/persistence: no new persisted metadata or FE-BE protocol fields were introduced in the actual PR diff.\n- Data correctness/MoW: the changed read-plan and merge paths account for old row delete signs, sequence rows, same-batch duplicate keys, and path-level VARIANT conflict markers; no concrete version/delete-bitmap correctness issue found.\n- Error handling/memory: new VARIANT merge errors propagate through Status in the reviewed write/publish paths; no unchecked Status or obvious untracked large allocation issue found.\n- Tests: coverage is relevant; I did not run the test suite in this review environment.\n- User focus: no additional user-provided review focus was supplied.

@eldenmoon eldenmoon force-pushed the codex/cir-18527-variant-subcolumn-update-pr-latest branch from ae3ea35 to c773c69 Compare May 12, 2026 12:26
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one blocking correctness issue in the flexible VARIANT partial update path. The main feature direction is covered by unit/regression tests for same-batch merges, publish conflicts, row-store/column-store, sequence columns, doc-mode rejection, and invalid patch values, but the new aggregation path is not safe for sliced RowsInBlock input.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to support JSON object patch semantics for VARIANT flexible partial update, and tests cover many core cases, but they do not cover RowsInBlock.row_pos > 0.
  • Scope: The feature is mostly focused, but the no-sequence aggregation change broadens write-path behavior and needs the row-slice invariant fixed.
  • Concurrency/lifecycle: No new shared-state locking or lifecycle issue found in the reviewed paths.
  • Compatibility/config: No new config or wire/storage format compatibility issue found beyond reusing the hidden skip bitmap; marker handling is filtered from read plans.
  • Parallel paths: Row-store/column-store and publish-conflict paths were reviewed; the sliced-block issue applies before both downstream paths.
  • Tests: Missing coverage for flexible variant partial update when a segment writer receives a non-zero row_pos slice with duplicate keys.
  • Observability/performance: No separate blocking observability or obvious hot-path performance issue found.
  • User focus: No additional user-provided review focus was present.

Comment thread be/src/storage/segment/vertical_segment_writer.cpp
@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 100% (0/0) 🎉
Increment coverage report
Complete coverage report

@eldenmoon eldenmoon force-pushed the codex/cir-18527-variant-subcolumn-update-pr-latest branch from c773c69 to 0553706 Compare May 12, 2026 13:09
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29465 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit ae3ea351a7c7f57068530a9e94d2632f3dbe53f0, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17660	3836	3834	3834
q2	q3	10695	876	613	613
q4	4661	456	346	346
q5	7447	1340	1142	1142
q6	203	167	138	138
q7	923	936	764	764
q8	9882	1433	1355	1355
q9	5686	5444	5343	5343
q10	6304	2069	1817	1817
q11	475	267	253	253
q12	683	414	294	294
q13	18201	3287	2727	2727
q14	289	283	263	263
q15	q16	908	870	806	806
q17	943	1021	730	730
q18	6532	5663	5540	5540
q19	1163	1234	1054	1054
q20	508	405	267	267
q21	4555	2283	1880	1880
q22	426	355	299	299
Total cold run time: 98144 ms
Total hot run time: 29465 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4160	4086	4077	4077
q2	q3	4620	4790	4179	4179
q4	2104	2184	1390	1390
q5	4975	5022	5297	5022
q6	199	167	128	128
q7	2070	1765	1954	1765
q8	3419	3215	3173	3173
q9	8523	8558	8492	8492
q10	4489	4463	4230	4230
q11	605	433	407	407
q12	734	736	528	528
q13	3127	3586	2928	2928
q14	296	310	275	275
q15	q16	760	778	704	704
q17	1326	1338	1259	1259
q18	8225	7140	7083	7083
q19	1181	1181	1183	1181
q20	2232	2293	1958	1958
q21	6136	5505	4850	4850
q22	552	534	441	441
Total cold run time: 59733 ms
Total hot run time: 54070 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29810 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit c773c699b978ad67b67bedc8e2a21376bf626c57, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17615	3976	3892	3892
q2	q3	10693	883	615	615
q4	4664	459	348	348
q5	7453	1361	1156	1156
q6	189	172	140	140
q7	933	974	755	755
q8	9336	1432	1302	1302
q9	5665	5402	5341	5341
q10	6292	2104	1834	1834
q11	486	274	268	268
q12	628	414	291	291
q13	18114	3267	2711	2711
q14	299	286	270	270
q15	q16	909	874	792	792
q17	1003	1160	765	765
q18	6456	5729	5604	5604
q19	1304	1336	1130	1130
q20	517	406	267	267
q21	4888	2403	1973	1973
q22	494	393	356	356
Total cold run time: 97938 ms
Total hot run time: 29810 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4808	4825	4907	4825
q2	q3	4663	4826	4184	4184
q4	2146	2171	1438	1438
q5	5075	5050	5255	5050
q6	198	173	135	135
q7	2072	1824	1590	1590
q8	3369	3105	3136	3105
q9	8612	8445	8415	8415
q10	4503	4506	4240	4240
q11	609	422	384	384
q12	699	746	513	513
q13	3307	3696	2935	2935
q14	300	314	279	279
q15	q16	909	779	691	691
q17	1351	1308	1261	1261
q18	8036	7336	7082	7082
q19	1173	1158	1160	1158
q20	2229	2257	1925	1925
q21	6168	5441	4881	4881
q22	546	506	414	414
Total cold run time: 60773 ms
Total hot run time: 54505 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 171133 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit ae3ea351a7c7f57068530a9e94d2632f3dbe53f0, data reload: false

query5	4304	690	520	520
query6	333	223	200	200
query7	4227	574	316	316
query8	331	237	219	219
query9	8854	4048	4016	4016
query10	460	339	303	303
query11	6021	2342	2214	2214
query12	183	128	133	128
query13	1305	618	415	415
query14	6807	5346	5038	5038
query14_1	4352	4368	4349	4349
query15	214	199	184	184
query16	1005	470	425	425
query17	1295	787	627	627
query18	2743	468	353	353
query19	227	206	164	164
query20	139	134	131	131
query21	215	143	118	118
query22	13634	13498	13423	13423
query23	17235	16424	16502	16424
query23_1	16297	16360	16246	16246
query24	7741	1826	1488	1488
query24_1	1406	1369	1399	1369
query25	597	516	482	482
query26	1294	325	179	179
query27	2788	617	361	361
query28	4465	1950	2057	1950
query29	1112	707	582	582
query30	312	245	197	197
query31	1146	1073	940	940
query32	87	75	74	74
query33	541	350	312	312
query34	1146	1135	633	633
query35	774	788	687	687
query36	1363	1306	1141	1141
query37	151	109	92	92
query38	3174	3133	3055	3055
query39	918	920	891	891
query39_1	881	876	872	872
query40	258	159	140	140
query41	70	68	66	66
query42	113	114	115	114
query43	326	328	286	286
query44	
query45	213	202	196	196
query46	1070	1205	749	749
query47	2298	2313	2173	2173
query48	410	423	297	297
query49	658	568	441	441
query50	706	289	221	221
query51	4331	4284	4145	4145
query52	108	109	97	97
query53	265	283	212	212
query54	333	288	284	284
query55	94	94	87	87
query56	337	329	340	329
query57	1428	1413	1321	1321
query58	313	285	280	280
query59	1606	1637	1475	1475
query60	356	352	332	332
query61	187	183	183	183
query62	673	630	573	573
query63	241	211	204	204
query64	2439	905	757	757
query65	
query66	1698	507	395	395
query67	29957	29958	29760	29760
query68	
query69	472	334	299	299
query70	1011	986	966	966
query71	319	276	274	274
query72	2881	2705	2438	2438
query73	847	728	413	413
query74	5074	4894	4718	4718
query75	2820	2654	2380	2380
query76	2288	1153	779	779
query77	415	436	347	347
query78	12892	13117	12352	12352
query79	1500	998	740	740
query80	1354	608	491	491
query81	518	287	247	247
query82	1014	164	120	120
query83	318	277	245	245
query84	254	140	113	113
query85	904	493	446	446
query86	458	359	356	356
query87	3445	3351	3242	3242
query88	3545	2677	2681	2677
query89	445	376	354	354
query90	1863	182	181	181
query91	181	197	140	140
query92	79	76	71	71
query93	1159	941	575	575
query94	714	332	301	301
query95	680	450	347	347
query96	1096	786	332	332
query97	2666	2677	2616	2616
query98	253	229	229	229
query99	1143	1097	972	972
Total cold run time: 256152 ms
Total hot run time: 171133 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172478 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit c773c699b978ad67b67bedc8e2a21376bf626c57, data reload: false

query5	4337	655	509	509
query6	349	221	207	207
query7	4264	598	299	299
query8	336	234	222	222
query9	8822	4050	4036	4036
query10	446	371	305	305
query11	5767	2356	2224	2224
query12	186	135	129	129
query13	1297	602	439	439
query14	6559	5382	5139	5139
query14_1	4407	4334	4351	4334
query15	213	203	178	178
query16	1038	465	455	455
query17	1143	755	614	614
query18	2702	483	356	356
query19	216	206	165	165
query20	137	131	132	131
query21	214	139	117	117
query22	13584	14147	14489	14147
query23	17461	16518	16351	16351
query23_1	16450	16288	16320	16288
query24	7369	1738	1334	1334
query24_1	1354	1331	1352	1331
query25	553	490	423	423
query26	1290	322	177	177
query27	2661	569	349	349
query28	4398	1968	1933	1933
query29	987	624	503	503
query30	295	235	199	199
query31	1097	1065	915	915
query32	86	72	70	70
query33	526	350	283	283
query34	1172	1125	648	648
query35	745	789	664	664
query36	1321	1347	1179	1179
query37	147	94	89	89
query38	3202	3120	3078	3078
query39	955	921	886	886
query39_1	877	882	876	876
query40	230	155	134	134
query41	61	59	59	59
query42	110	106	106	106
query43	319	323	280	280
query44	
query45	205	198	190	190
query46	1062	1189	736	736
query47	2325	2283	2181	2181
query48	387	424	291	291
query49	623	529	433	433
query50	703	277	224	224
query51	4344	4315	4173	4173
query52	102	102	92	92
query53	249	276	202	202
query54	307	273	254	254
query55	95	88	82	82
query56	293	311	288	288
query57	1421	1398	1314	1314
query58	294	259	280	259
query59	1557	1627	1405	1405
query60	347	345	322	322
query61	148	155	149	149
query62	659	619	564	564
query63	248	202	202	202
query64	2348	802	669	669
query65	
query66	1734	544	403	403
query67	29498	29949	29946	29946
query68	
query69	470	336	321	321
query70	1049	989	968	968
query71	325	290	280	280
query72	3038	2720	2448	2448
query73	856	730	445	445
query74	5022	4889	4744	4744
query75	2793	2648	2323	2323
query76	2298	1131	764	764
query77	427	416	343	343
query78	12853	12828	12424	12424
query79	1476	994	718	718
query80	670	580	484	484
query81	453	285	240	240
query82	1363	159	123	123
query83	364	273	256	256
query84	266	143	108	108
query85	856	522	477	477
query86	393	337	319	319
query87	3385	3363	3204	3204
query88	3520	2666	2633	2633
query89	430	384	337	337
query90	1928	180	171	171
query91	180	162	138	138
query92	76	80	75	75
query93	955	956	567	567
query94	555	349	315	315
query95	644	471	362	362
query96	1084	739	347	347
query97	2705	2698	2610	2610
query98	241	232	227	227
query99	1140	1109	973	973
Total cold run time: 253368 ms
Total hot run time: 172478 ms

Comment thread be/src/format/json/new_json_reader.cpp
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary: I am requesting changes based on the existing inline thread at be/src/storage/segment/vertical_segment_writer.cpp:772 (#63182 (comment)). I did not add a duplicate inline comment because that thread already covers the concrete blocking issue: the new flexible VARIANT aggregation path processes rows from offset 0 while the segment writer API can pass a RowsInBlock slice with non-zero row_pos, which can aggregate/merge the wrong rows and leave later bitmap/delete-sign/key-column accesses inconsistent.

Critical checkpoint conclusions:

  • Goal/test: The PR aims to support flexible partial updates for VARIANT object patches with same-batch merging and publish-conflict replay. The included unit and regression coverage exercises normal object patching, conflict replay, doc-mode rejection, null rejection, sequence cases, and row-store/non-row-store paths, but the row-slice case from the existing thread is not covered.
  • Scope: The change is focused on VARIANT flexible partial update, but it touches multiple hot ingestion/write paths.
  • Concurrency/lifecycle: No new thread/lifecycle ownership issue found in the reviewed paths; the main correctness risk is within segment write row slicing and downstream mutation of the block.
  • Config/compatibility: No new config or persisted format version was added. The feature stores extra marker values in the existing skip bitmap; this needs the row-slice fix to be safe before relying on it.
  • Parallel paths: JSON reader, memtable aggregation, vertical segment writer, read-plan fill, and publish conflict replay were checked. I did not find another distinct issue beyond the existing row_pos bug.
  • Tests: Existing tests are broad for common and conflict paths, but missing non-zero row_pos coverage for flexible VARIANT partial update with duplicate keys, as already requested in the inline thread.
  • Observability/performance: No separate blocking observability or performance issue found.

User focus: No additional user-provided review focus was specified.

Comment thread be/src/storage/segment/vertical_segment_writer.cpp
Comment thread be/src/storage/segment/vertical_segment_writer.cpp
Comment thread be/src/storage/tablet/base_tablet.cpp
Comment thread be/src/storage/partial_update_info.cpp
Comment thread be/src/storage/partial_update_info.cpp
@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 29736 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 0553706fd03a6ac837232610780d02ff2a8079c4, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17604	3963	3886	3886
q2	q3	10699	883	609	609
q4	4662	461	342	342
q5	7461	1363	1136	1136
q6	192	173	149	149
q7	912	957	779	779
q8	9320	1405	1262	1262
q9	5596	5390	5326	5326
q10	6244	2093	1825	1825
q11	472	264	262	262
q12	622	413	303	303
q13	18113	3293	2775	2775
q14	301	286	269	269
q15	q16	902	860	796	796
q17	1042	1121	697	697
q18	6518	5725	5632	5632
q19	1179	1173	1099	1099
q20	501	408	265	265
q21	4965	2370	1987	1987
q22	476	423	337	337
Total cold run time: 97781 ms
Total hot run time: 29736 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4735	4696	4941	4696
q2	q3	4678	4808	4238	4238
q4	2192	2177	1451	1451
q5	4996	5020	5330	5020
q6	223	172	131	131
q7	2083	1794	1617	1617
q8	3407	3114	3108	3108
q9	8345	8477	8492	8477
q10	4512	4519	4260	4260
q11	626	414	386	386
q12	685	759	516	516
q13	3251	3617	2937	2937
q14	311	307	275	275
q15	q16	771	906	731	731
q17	1340	1291	1272	1272
q18	8038	7096	7185	7096
q19	1151	1181	1143	1143
q20	2241	2258	1949	1949
q21	6218	5507	5006	5006
q22	568	500	446	446
Total cold run time: 60371 ms
Total hot run time: 54755 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 171930 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 0553706fd03a6ac837232610780d02ff2a8079c4, data reload: false

query5	4325	659	523	523
query6	335	213	200	200
query7	4294	538	318	318
query8	325	227	223	223
query9	8811	4081	4069	4069
query10	491	346	302	302
query11	5801	2398	2243	2243
query12	186	131	127	127
query13	1325	632	446	446
query14	6056	5398	5007	5007
query14_1	4323	4337	4344	4337
query15	211	201	179	179
query16	1031	440	430	430
query17	1135	745	613	613
query18	2610	474	337	337
query19	217	199	167	167
query20	139	137	132	132
query21	209	137	118	118
query22	13646	13970	14543	13970
query23	17420	16569	16151	16151
query23_1	16329	16243	16307	16243
query24	7428	1753	1347	1347
query24_1	1359	1361	1367	1361
query25	578	518	444	444
query26	1298	332	172	172
query27	2685	620	342	342
query28	4413	1983	1996	1983
query29	991	658	548	548
query30	307	241	196	196
query31	1104	1113	936	936
query32	85	75	70	70
query33	523	346	303	303
query34	1172	1109	643	643
query35	760	783	673	673
query36	1332	1326	1173	1173
query37	146	95	85	85
query38	3200	3131	3040	3040
query39	931	930	876	876
query39_1	875	869	865	865
query40	229	153	133	133
query41	63	59	58	58
query42	109	114	109	109
query43	320	329	278	278
query44	
query45	212	197	190	190
query46	1094	1174	710	710
query47	2309	2315	2154	2154
query48	419	427	293	293
query49	640	533	427	427
query50	696	276	220	220
query51	4254	4350	4247	4247
query52	106	107	93	93
query53	255	278	204	204
query54	306	265	275	265
query55	100	94	90	90
query56	295	311	305	305
query57	1404	1397	1316	1316
query58	293	270	267	267
query59	1557	1646	1422	1422
query60	340	332	355	332
query61	155	152	158	152
query62	669	618	566	566
query63	247	201	204	201
query64	2365	847	681	681
query65	
query66	1713	519	383	383
query67	30147	30031	29890	29890
query68	
query69	473	341	298	298
query70	993	965	978	965
query71	311	280	271	271
query72	2937	2696	2647	2647
query73	834	800	451	451
query74	5074	4986	4724	4724
query75	2798	2672	2313	2313
query76	2294	1109	762	762
query77	429	421	346	346
query78	12994	12944	12406	12406
query79	1515	981	766	766
query80	683	602	482	482
query81	462	282	238	238
query82	1313	162	123	123
query83	355	275	247	247
query84	280	138	109	109
query85	858	513	435	435
query86	400	338	309	309
query87	3395	3363	3210	3210
query88	3524	2669	2656	2656
query89	460	382	337	337
query90	1932	185	185	185
query91	175	171	142	142
query92	76	72	73	72
query93	950	952	592	592
query94	539	350	306	306
query95	650	377	342	342
query96	1041	775	361	361
query97	2701	2670	2583	2583
query98	250	234	227	227
query99	1117	1115	968	968
Total cold run time: 253494 ms
Total hot run time: 171930 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 0.00% (0/3) 🎉
Increment coverage report
Complete coverage report

@eldenmoon eldenmoon force-pushed the codex/cir-18527-variant-subcolumn-update-pr-latest branch from 0553706 to ac082f9 Compare May 12, 2026 13:49
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found two correctness/validation gaps that should be addressed before this is merged. The main data-correctness concern is that nested empty-object VARIANT patches are accepted but lose their intended path, so stale subpaths can survive same-batch and publish-conflict merges. I also found that the new doc-mode restriction is not enforced when enabling UPDATE_FLEXIBLE_COLUMNS via ALTER TABLE, so unsupported tables can still be enabled and fail later at load time.

Critical checkpoint conclusions: goal is clear and partially achieved, with tests for ordinary object-path merges but missing empty-object patch coverage; the change is mostly focused but adds parallel validation paths that are not fully synchronized; no new unsafe locking/concurrency pattern was found in the reviewed code, while publish-conflict behavior is affected by the marker issue; no new config item or persistence format was added; FE/BE behavior is mostly aligned except the ALTER-enable validation gap; transaction/delete-bitmap paths still rely on existing MoW mechanisms, but path-marker completeness is required for correctness; observability is not a blocker; user focus file had no additional focus points.

Comment thread be/src/exec/common/variant_util.cpp Outdated
Comment thread fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java Outdated
@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 30855 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 752be339e61ccfbf2cc5ad4a5c6aa5d093054aaa, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17625	3931	3886	3886
q2	q3	10939	1409	792	792
q4	4745	470	347	347
q5	9900	2277	2073	2073
q6	386	177	136	136
q7	969	783	638	638
q8	9583	1628	1467	1467
q9	7061	4906	4921	4906
q10	6441	2142	1758	1758
q11	436	274	245	245
q12	690	426	296	296
q13	18244	3444	2783	2783
q14	262	255	232	232
q15	q16	821	771	701	701
q17	957	924	949	924
q18	6796	5682	5512	5512
q19	1330	1366	1117	1117
q20	515	414	259	259
q21	5672	2678	2488	2488
q22	444	355	295	295
Total cold run time: 103816 ms
Total hot run time: 30855 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4194	4064	4107	4064
q2	q3	4490	4878	4303	4303
q4	2077	2205	1399	1399
q5	4358	4260	4812	4260
q6	254	204	151	151
q7	2006	1888	1548	1548
q8	2433	2065	2115	2065
q9	7725	7708	7564	7564
q10	4603	4517	4107	4107
q11	575	424	372	372
q12	729	752	520	520
q13	3375	3649	3011	3011
q14	297	302	290	290
q15	q16	699	749	630	630
q17	1348	1336	1308	1308
q18	7842	7327	6600	6600
q19	1088	1127	1093	1093
q20	2232	2225	1937	1937
q21	5279	4621	4427	4427
q22	525	458	400	400
Total cold run time: 56129 ms
Total hot run time: 50049 ms

@eldenmoon eldenmoon force-pushed the codex/cir-18527-variant-subcolumn-update-pr-latest branch from d73b6ab to aaef4cc Compare May 16, 2026 18:46
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169372 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 0b825c284d78844f5e8343eaf061710bd2d9fa03, data reload: false

query5	4339	661	525	525
query6	332	225	195	195
query7	4260	576	319	319
query8	327	238	230	230
query9	8832	4009	4005	4005
query10	446	391	315	315
query11	5818	2417	2228	2228
query12	183	130	126	126
query13	1365	645	431	431
query14	5954	5364	5045	5045
query14_1	4354	4340	4343	4340
query15	214	202	184	184
query16	1078	470	448	448
query17	1173	742	614	614
query18	2739	498	370	370
query19	232	211	185	185
query20	142	131	131	131
query21	217	139	119	119
query22	13616	13559	13416	13416
query23	17260	16376	16141	16141
query23_1	16198	16242	16324	16242
query24	7523	1763	1305	1305
query24_1	1325	1267	1324	1267
query25	570	514	446	446
query26	1325	320	171	171
query27	2681	560	352	352
query28	4381	1944	1927	1927
query29	980	651	523	523
query30	309	243	207	207
query31	1111	1066	947	947
query32	89	82	79	79
query33	548	359	309	309
query34	1179	1147	633	633
query35	817	786	656	656
query36	1353	1303	1148	1148
query37	156	104	96	96
query38	3217	3168	3074	3074
query39	929	944	896	896
query39_1	872	888	886	886
query40	226	144	127	127
query41	66	62	66	62
query42	111	110	107	107
query43	323	327	298	298
query44	
query45	212	202	191	191
query46	1119	1203	727	727
query47	2300	2323	2156	2156
query48	395	404	309	309
query49	629	492	380	380
query50	970	339	250	250
query51	4373	4310	4244	4244
query52	106	105	94	94
query53	253	277	202	202
query54	307	266	249	249
query55	98	89	87	87
query56	303	314	299	299
query57	1424	1396	1336	1336
query58	311	271	281	271
query59	1607	1621	1382	1382
query60	320	330	304	304
query61	160	159	157	157
query62	669	622	553	553
query63	254	199	204	199
query64	2371	814	621	621
query65	
query66	1687	468	342	342
query67	30121	29318	29824	29318
query68	
query69	473	338	335	335
query70	1020	1004	976	976
query71	312	284	266	266
query72	3068	2748	2448	2448
query73	830	783	409	409
query74	5060	4883	4721	4721
query75	2677	2597	2247	2247
query76	2345	1136	752	752
query77	390	403	343	343
query78	12150	12318	11548	11548
query79	1377	1058	736	736
query80	642	549	462	462
query81	453	281	250	250
query82	1089	161	126	126
query83	356	276	246	246
query84	270	145	111	111
query85	886	537	458	458
query86	390	338	316	316
query87	3393	3363	3248	3248
query88	3501	2634	2596	2596
query89	430	386	336	336
query90	1958	184	175	175
query91	181	173	146	146
query92	82	75	74	74
query93	1501	1460	913	913
query94	542	360	330	330
query95	658	394	442	394
query96	1040	816	322	322
query97	2728	2709	2563	2563
query98	249	249	252	249
query99	1106	1077	976	976
Total cold run time: 253336 ms
Total hot run time: 169372 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 170246 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit d6104f1efa160b15e62f87d56f45c0ef93e58ac0, data reload: false

query5	4325	650	525	525
query6	345	217	200	200
query7	4502	548	309	309
query8	332	226	207	207
query9	8822	3973	3973	3973
query10	447	342	297	297
query11	5824	2404	2140	2140
query12	185	126	126	126
query13	1295	609	427	427
query14	5952	5353	5067	5067
query14_1	4346	4356	4308	4308
query15	223	207	185	185
query16	1012	481	445	445
query17	987	727	575	575
query18	2440	490	354	354
query19	206	202	161	161
query20	136	132	140	132
query21	210	140	117	117
query22	13661	13611	13476	13476
query23	17262	16510	16108	16108
query23_1	16271	16313	16245	16245
query24	7553	1753	1288	1288
query24_1	1293	1297	1306	1297
query25	543	461	396	396
query26	1337	315	170	170
query27	2712	539	334	334
query28	4470	1937	1946	1937
query29	954	627	494	494
query30	308	242	202	202
query31	1100	1065	932	932
query32	81	83	71	71
query33	531	350	286	286
query34	1156	1114	624	624
query35	749	777	672	672
query36	1344	1355	1206	1206
query37	152	107	94	94
query38	3209	3137	3048	3048
query39	932	932	906	906
query39_1	879	884	879	879
query40	228	145	126	126
query41	68	64	62	62
query42	113	110	111	110
query43	326	326	289	289
query44	
query45	217	208	198	198
query46	1072	1248	753	753
query47	2325	2314	2222	2222
query48	403	440	288	288
query49	650	504	435	435
query50	962	362	261	261
query51	4331	4279	4236	4236
query52	108	115	96	96
query53	254	280	211	211
query54	324	317	252	252
query55	93	88	83	83
query56	297	319	310	310
query57	1399	1401	1326	1326
query58	289	269	267	267
query59	1557	1583	1388	1388
query60	319	323	300	300
query61	155	156	147	147
query62	644	614	556	556
query63	237	196	210	196
query64	2376	797	625	625
query65	
query66	1721	467	352	352
query67	29847	29923	29698	29698
query68	
query69	473	341	308	308
query70	1011	1014	1000	1000
query71	301	272	269	269
query72	3056	2781	2430	2430
query73	850	791	430	430
query74	5051	4915	4729	4729
query75	2649	2602	2235	2235
query76	2330	1129	732	732
query77	399	402	332	332
query78	12126	12209	11608	11608
query79	1248	1049	743	743
query80	595	550	451	451
query81	448	282	241	241
query82	245	160	121	121
query83	276	279	248	248
query84	293	138	105	105
query85	893	538	452	452
query86	369	306	301	301
query87	3362	3405	3212	3212
query88	3481	2652	2660	2652
query89	431	389	342	342
query90	2156	184	175	175
query91	175	170	138	138
query92	76	86	82	82
query93	1512	1383	856	856
query94	536	321	327	321
query95	659	376	349	349
query96	1076	841	329	329
query97	2706	2728	2567	2567
query98	237	230	229	229
query99	1130	1122	998	998
Total cold run time: 251396 ms
Total hot run time: 170246 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 170497 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 8978736b9578aae8b3b7a29b0863660340387994, data reload: false

query5	4303	661	523	523
query6	324	219	200	200
query7	4244	565	293	293
query8	326	231	222	222
query9	8815	4052	4040	4040
query10	457	345	306	306
query11	5795	2422	2187	2187
query12	187	129	126	126
query13	1286	626	420	420
query14	6083	5413	5041	5041
query14_1	4383	4410	4387	4387
query15	214	205	184	184
query16	1042	489	457	457
query17	1170	754	621	621
query18	2728	498	371	371
query19	221	206	167	167
query20	142	135	130	130
query21	223	151	123	123
query22	13708	13780	13439	13439
query23	17128	16423	15919	15919
query23_1	16202	16165	16137	16137
query24	7378	1755	1302	1302
query24_1	1304	1319	1307	1307
query25	595	503	445	445
query26	1370	324	175	175
query27	2641	587	348	348
query28	4412	1968	1929	1929
query29	1028	649	537	537
query30	310	237	202	202
query31	1137	1072	952	952
query32	86	82	75	75
query33	558	359	309	309
query34	1171	1117	646	646
query35	795	779	674	674
query36	1314	1312	1177	1177
query37	154	103	89	89
query38	3217	3128	3065	3065
query39	924	920	889	889
query39_1	868	892	863	863
query40	235	151	124	124
query41	66	68	64	64
query42	110	110	113	110
query43	333	326	293	293
query44	
query45	209	200	199	199
query46	1086	1162	695	695
query47	2318	2312	2153	2153
query48	409	399	306	306
query49	629	483	390	390
query50	960	353	259	259
query51	4308	4297	4250	4250
query52	106	110	94	94
query53	256	280	211	211
query54	321	279	272	272
query55	97	91	87	87
query56	302	311	309	309
query57	1418	1360	1291	1291
query58	295	276	261	261
query59	1587	1616	1423	1423
query60	332	351	311	311
query61	163	159	159	159
query62	659	622	561	561
query63	254	202	204	202
query64	2365	815	686	686
query65	
query66	1658	485	351	351
query67	29897	30016	29809	29809
query68	
query69	466	346	306	306
query70	997	1022	1000	1000
query71	310	282	269	269
query72	2936	2882	2451	2451
query73	836	821	435	435
query74	5070	4888	4705	4705
query75	2668	2600	2236	2236
query76	2268	1128	791	791
query77	411	413	339	339
query78	12084	12038	11563	11563
query79	1468	1026	731	731
query80	676	548	475	475
query81	456	280	240	240
query82	1340	159	124	124
query83	361	282	251	251
query84	257	145	107	107
query85	888	565	463	463
query86	396	364	337	337
query87	3488	3335	3195	3195
query88	3569	2657	2653	2653
query89	437	390	337	337
query90	1998	185	190	185
query91	184	171	142	142
query92	80	80	75	75
query93	1480	1413	861	861
query94	530	337	318	318
query95	698	481	353	353
query96	1051	803	332	332
query97	2685	2677	2532	2532
query98	239	226	228	226
query99	1125	1130	1039	1039
Total cold run time: 253140 ms
Total hot run time: 170497 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169833 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 752be339e61ccfbf2cc5ad4a5c6aa5d093054aaa, data reload: false

query5	4320	663	515	515
query6	337	222	208	208
query7	4237	551	305	305
query8	329	227	230	227
query9	8803	3945	3967	3945
query10	470	342	300	300
query11	5782	2397	2184	2184
query12	186	130	125	125
query13	1282	613	440	440
query14	5934	5354	5131	5131
query14_1	4390	4345	4363	4345
query15	207	202	187	187
query16	1006	493	428	428
query17	1152	764	620	620
query18	2556	485	359	359
query19	210	206	159	159
query20	147	131	128	128
query21	226	140	115	115
query22	13605	13492	13386	13386
query23	17325	16372	16007	16007
query23_1	16145	16161	16193	16161
query24	7538	1786	1294	1294
query24_1	1301	1309	1307	1307
query25	549	472	409	409
query26	1304	331	169	169
query27	2695	559	341	341
query28	4446	1939	1911	1911
query29	984	626	497	497
query30	301	247	194	194
query31	1108	1052	939	939
query32	91	79	74	74
query33	539	347	303	303
query34	1166	1125	647	647
query35	757	779	687	687
query36	1332	1311	1187	1187
query37	155	103	102	102
query38	3225	3144	3045	3045
query39	921	916	906	906
query39_1	865	877	910	877
query40	230	146	124	124
query41	97	63	62	62
query42	110	110	110	110
query43	323	318	291	291
query44	
query45	207	203	197	197
query46	1062	1198	707	707
query47	2219	2307	2127	2127
query48	403	403	300	300
query49	628	510	385	385
query50	981	347	260	260
query51	4327	4204	4175	4175
query52	104	105	94	94
query53	250	279	203	203
query54	305	276	267	267
query55	92	89	84	84
query56	311	310	320	310
query57	1405	1396	1296	1296
query58	298	284	266	266
query59	1525	1638	1397	1397
query60	326	325	311	311
query61	161	156	151	151
query62	669	619	569	569
query63	242	204	224	204
query64	2386	809	653	653
query65	
query66	1685	479	390	390
query67	30139	29951	29799	29799
query68	
query69	480	341	305	305
query70	1025	940	927	927
query71	312	278	267	267
query72	2985	2719	2398	2398
query73	851	770	405	405
query74	5033	4903	4728	4728
query75	2667	2607	2253	2253
query76	2317	1135	788	788
query77	394	432	338	338
query78	12104	12121	11697	11697
query79	1252	1021	715	715
query80	625	564	483	483
query81	453	293	246	246
query82	331	163	125	125
query83	365	291	262	262
query84	267	145	136	136
query85	972	618	533	533
query86	397	323	329	323
query87	3416	3448	3236	3236
query88	3550	2697	2689	2689
query89	433	389	335	335
query90	1874	187	195	187
query91	193	181	154	154
query92	77	79	79	79
query93	1481	1551	806	806
query94	543	364	336	336
query95	715	484	369	369
query96	1078	811	338	338
query97	2668	2670	2543	2543
query98	242	233	267	233
query99	1140	1100	991	991
Total cold run time: 251639 ms
Total hot run time: 169833 ms

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one blocking issue. The PR goal is to support flexible partial updates, including new VARIANT patch handling and routine-load validation/persistence. The implementation is mostly focused, but one table-level invariant is still missing at the feature-enable/validation boundary.

Critical checkpoint conclusions:

  • Goal/test: The PR adds broad regression and unit coverage for flexible partial update and VARIANT paths, but cluster-key tables are not covered and can still be put into an unusable enabled state.
  • Scope: The changes are generally focused on flexible partial update, routine-load metadata, BE marker handling, and validation.
  • Concurrency: No new distinct concurrency issue found beyond existing review threads.
  • Lifecycle/persistence: Routine-load persistence risks are already covered by existing threads; no additional distinct issue found.
  • Config/compatibility: Existing review threads already cover BE marker compatibility/capability gating.
  • Parallel paths: The table-level validator omits the same cluster-key restriction enforced by stream/routine load planning, causing a distinct enable-time gap.
  • Tests: Missing negative coverage for enabling UPDATE_FLEXIBLE_COLUMNS on MoW unique tables with cluster keys.
  • Observability/transactions/data writes/performance: No additional distinct blocker found beyond existing threads.

User focus: no additional user-provided review focus was specified.

Comment thread fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java
@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.06% (1854/2375)
Line Coverage 64.52% (33329/51653)
Region Coverage 65.23% (16525/25335)
Branch Coverage 55.73% (8832/15848)

### What problem does this PR solve?

Issue Number: close apache#48122

Related PR: N/A

Problem Summary: Allow MOW unique flexible partial update loads to patch VARIANT object paths while preserving undeclared paths, including duplicate-key batching, sequence semantics, routine-load replay, publish conflict replay, and rejected-row filtering for invalid VARIANT patch values. V1 accepts JSON object patches only and rejects unsupported VARIANT modes. Also reject explicit merge_type request shapes, WHERE, delete, and sequence semantics for flexible partial update across stream load and routine load so unsupported semantics cannot be accepted accidentally. Gate VARIANT flexible partial update on an explicit BE heartbeat capability so FE cannot enable marker-producing loads against old or actually dead backends.

### Release note

MOW unique tables can use JSON flexible partial update loads to patch object fields inside supported VARIANT columns. Flexible partial update rejects explicit merge_type, WHERE, delete, and sequence options, and VARIANT flexible partial update requires each backend in the current cluster to be alive and advertise the required heartbeat capability.

### Check List (For Author)

- Test: Unit Test and Regression test
    - ./build.sh --be --fe
    - ./build.sh --fe
    - ./run-fe-ut.sh --run org.apache.doris.catalog.OlapTableTest
    - ./run-fe-ut.sh --run org.apache.doris.nereids.load.NereidsStreamLoadPlannerTest
    - ./run-fe-ut.sh --run org.apache.doris.catalog.OlapTableTest,org.apache.doris.system.SystemInfoServiceTest
    - ./run-fe-ut.sh --run org.apache.doris.system.SystemInfoServiceTest
    - ./run-fe-ut.sh --run org.apache.doris.load.routineload.RoutineLoadJobTest,org.apache.doris.persist.AlterRoutineLoadOperationLogTest
    - ./run-fe-ut.sh --run org.apache.doris.load.routineload.RoutineLoadJobTest,org.apache.doris.load.routineload.KinesisRoutineLoadJobTest,org.apache.doris.persist.AlterRoutineLoadOperationLogTest,org.apache.doris.catalog.OlapTableTest
    - ./run-fe-ut.sh --run org.apache.doris.nereids.trees.plans.commands.AlterTableCommandTest,org.apache.doris.catalog.OlapTableTest,org.apache.doris.load.routineload.RoutineLoadJobTest,org.apache.doris.load.routineload.KinesisRoutineLoadJobTest,org.apache.doris.persist.AlterRoutineLoadOperationLogTest
    - ./run-be-ut.sh --run --filter='*VariantUtilTest*'
    - ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d unique_with_mow_p0/flexible -s test_flexible_partial_update_variant
    - ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d unique_with_mow_p0/flexible -s test_flexible_partial_update_restricts
    - ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d unique_with_mow_p0/flexible -s test_flexible_partial_update_property
    - ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d load_p0/routine_load -s test_routine_load_flexible_partial_update
    - ./run-regression-test.sh --run --conf tmp/regression-conf.auto.groovy -d load_p0/routine_load -s test_routine_load_flexible_partial_update_validate
    - git diff --check
    - git diff --cached --check
    - clang-format lint action script over modified C++ files
- Behavior changed: Yes. JSON flexible partial update on MOW unique tables now merges declared VARIANT object paths and preserves undeclared paths. Flexible partial update now rejects explicit merge_type, WHERE, delete, and sequence clauses for stream/routine load request shapes. VARIANT flexible partial update now requires each backend in the current cluster to be alive and advertise the required heartbeat capability.
- Does this need documentation: No
@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31388 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit d73b6ab638261b168585a3a46b5fb0daa20ee788, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17312	3902	3935	3902
q2	q3	10567	1383	826	826
q4	4672	483	351	351
q5	7821	2303	2131	2131
q6	239	178	144	144
q7	927	780	641	641
q8	9436	1749	1621	1621
q9	5131	5001	4930	4930
q10	6439	2087	1824	1824
q11	434	271	252	252
q12	634	434	296	296
q13	18106	3400	2735	2735
q14	266	258	237	237
q15	q16	819	768	712	712
q17	1003	959	985	959
q18	7292	5757	5637	5637
q19	1154	1257	983	983
q20	523	450	345	345
q21	6015	2898	2532	2532
q22	474	484	330	330
Total cold run time: 99264 ms
Total hot run time: 31388 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4614	4621	4490	4490
q2	q3	4837	5246	4692	4692
q4	2134	2227	1449	1449
q5	4944	4577	4587	4577
q6	231	179	139	139
q7	1887	1738	1504	1504
q8	2365	2061	2127	2061
q9	7604	7167	7181	7167
q10	4466	4386	3983	3983
q11	528	373	348	348
q12	711	728	508	508
q13	3094	3379	2780	2780
q14	265	291	245	245
q15	q16	675	692	626	626
q17	1256	1246	1225	1225
q18	7259	6745	6834	6745
q19	1109	1140	1086	1086
q20	2198	2250	1929	1929
q21	5310	4579	4427	4427
q22	524	490	404	404
Total cold run time: 56011 ms
Total hot run time: 50385 ms

@eldenmoon eldenmoon force-pushed the codex/cir-18527-variant-subcolumn-update-pr-latest branch from aaef4cc to c59e395 Compare May 16, 2026 19:07
@eldenmoon
Copy link
Copy Markdown
Member Author

run buildall

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169226 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit d73b6ab638261b168585a3a46b5fb0daa20ee788, data reload: false

query5	4326	651	511	511
query6	339	232	214	214
query7	4258	531	304	304
query8	325	229	229	229
query9	8854	3999	3948	3948
query10	445	344	299	299
query11	5829	2424	2221	2221
query12	184	127	125	125
query13	1282	618	445	445
query14	5953	5346	5060	5060
query14_1	4332	4351	4330	4330
query15	216	204	180	180
query16	1004	470	446	446
query17	1161	755	601	601
query18	2601	492	364	364
query19	220	203	173	173
query20	138	136	132	132
query21	216	137	120	120
query22	13707	13668	13334	13334
query23	17132	16388	16063	16063
query23_1	16227	16283	16230	16230
query24	7658	1750	1296	1296
query24_1	1309	1344	1299	1299
query25	579	497	434	434
query26	1342	326	183	183
query27	2668	546	339	339
query28	4427	1942	1915	1915
query29	1040	643	512	512
query30	304	238	201	201
query31	1134	1062	947	947
query32	94	78	80	78
query33	534	364	300	300
query34	1163	1137	655	655
query35	766	779	712	712
query36	1341	1376	1222	1222
query37	152	100	90	90
query38	3233	3149	3020	3020
query39	923	926	900	900
query39_1	869	866	883	866
query40	224	143	123	123
query41	63	63	61	61
query42	112	107	114	107
query43	324	324	284	284
query44	
query45	211	197	194	194
query46	1052	1157	733	733
query47	2294	2287	2206	2206
query48	375	396	291	291
query49	633	483	387	387
query50	967	357	256	256
query51	4426	4282	4301	4282
query52	105	106	93	93
query53	254	286	204	204
query54	302	268	252	252
query55	97	88	83	83
query56	295	294	309	294
query57	1421	1423	1336	1336
query58	306	271	269	269
query59	1547	1638	1429	1429
query60	320	322	309	309
query61	168	150	156	150
query62	677	628	564	564
query63	233	202	212	202
query64	2399	815	629	629
query65	
query66	1696	476	389	389
query67	29980	29941	29839	29839
query68	
query69	464	347	306	306
query70	1000	1015	987	987
query71	308	273	261	261
query72	3059	2732	2415	2415
query73	888	814	419	419
query74	5091	4915	4718	4718
query75	2655	2596	2241	2241
query76	2203	1118	761	761
query77	396	405	332	332
query78	12237	12090	11635	11635
query79	1501	1013	713	713
query80	640	547	458	458
query81	456	275	243	243
query82	1353	159	124	124
query83	366	279	248	248
query84	268	142	110	110
query85	888	549	445	445
query86	400	315	301	301
query87	3396	3389	3213	3213
query88	3520	2638	2619	2619
query89	439	392	336	336
query90	1998	178	175	175
query91	177	171	142	142
query92	81	74	76	74
query93	1431	1497	849	849
query94	531	353	309	309
query95	675	385	347	347
query96	1103	762	324	324
query97	2709	2688	2544	2544
query98	237	226	223	223
query99	1119	1111	1001	1001
Total cold run time: 253381 ms
Total hot run time: 169226 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31121 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit aaef4cc98f53001e7814561f7604a225a7e8b0f5, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17229	4146	4088	4088
q2	q3	10542	1418	804	804
q4	4669	471	347	347
q5	7693	2292	2112	2112
q6	243	177	142	142
q7	951	752	634	634
q8	9423	1694	1554	1554
q9	5089	4906	4891	4891
q10	6382	2059	1776	1776
q11	449	285	248	248
q12	635	437	317	317
q13	18125	3459	2749	2749
q14	266	259	229	229
q15	q16	820	766	703	703
q17	1006	960	966	960
q18	6833	5834	5470	5470
q19	1231	1299	1111	1111
q20	520	412	264	264
q21	5559	2590	2417	2417
q22	436	365	305	305
Total cold run time: 98101 ms
Total hot run time: 31121 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4392	4267	4242	4242
q2	q3	4541	4959	4354	4354
q4	2183	2241	1391	1391
q5	4448	4312	4340	4312
q6	233	175	134	134
q7	1729	2220	1801	1801
q8	2758	2118	2313	2118
q9	8041	8021	7750	7750
q10	4612	4487	4051	4051
q11	602	436	400	400
q12	757	732	536	536
q13	3404	3739	2947	2947
q14	279	315	277	277
q15	q16	730	736	645	645
q17	1375	1351	1371	1351
q18	8202	7423	7372	7372
q19	1185	1149	1138	1138
q20	2229	2211	1941	1941
q21	5386	4761	4599	4599
q22	549	479	433	433
Total cold run time: 57635 ms
Total hot run time: 51792 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 78.66% (199/253) 🎉
Increment coverage report
Complete coverage report

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completed a full pass over the PR diff and the existing inline review context. I did not add new inline comments because the blocking issues I would rely on are already raised in existing threads and the instructions prohibit duplicating them.

Critical checkpoint conclusions:

  • Goal/test proof: the PR aims to support flexible partial update for VARIANT and tighten FE load validation. There is substantial BE/FE/regression coverage, but the existing review threads still identify uncovered negative cases and compatibility gaps.
  • Scope/clarity: the implementation is broad across FE validation, BE write/merge paths, heartbeat capability plumbing, and persistence. Several existing threads show places where the feature gate is still not consistently applied.
  • Concurrency/lifecycle: existing routine-load ALTER locking/persistence concerns and schema-change revalidation paths were reviewed; no additional distinct concurrency issue was found in this pass.
  • Configuration/dynamic behavior: no new config item issue found.
  • Compatibility: existing threads still cover blocking rolling-upgrade/marker capability and legacy persistence risks; these remain the main blockers.
  • Parallel paths: existing threads cover stream load vs routine load and RowsetBuilder vs DeltaWriterV2 path gaps; I did not find a new distinct omitted path beyond those.
  • Tests/results: many tests were added, but existing review threads request additional negative/compatibility coverage for the blocking paths.
  • Observability: no additional observability blocker found.
  • Transaction/persistence/data correctness: the already-open threads include data correctness and persistence failures significant enough to block approval.
  • User focus: no additional user-provided focus points were present.

Overall opinion: request changes based on the existing non-duplicate blocking inline threads; no additional inline comments are submitted in this review to avoid repeating already-known issues.

@hello-stephen
Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 78.06% (1854/2375)
Line Coverage 64.52% (33329/51653)
Region Coverage 65.22% (16524/25335)
Branch Coverage 55.74% (8834/15848)

@eldenmoon
Copy link
Copy Markdown
Member Author

/review

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review result: request changes. I did not add duplicate inline comments because the existing review context already contains the blocking findings. The unresolved blockers are still material: flexible partial update can still be enabled or altered into table/job shapes that later cannot execute, routine-load descriptor persistence/replay paths still need complete validation, and VARIANT skip-bitmap marker compatibility must be gated by an explicit BE capability across all participating backends.

Critical checkpoint conclusions:

  • Goal/test proof: the PR aims to support flexible partial update for VARIANT and tighten routine-load/stream-load validation, with substantial unit/regression coverage, but existing review threads show uncovered negative and compatibility cases remain.
  • Scope/clarity: the change is large and touches FE validation, BE storage/write paths, heartbeat capability, and persistence; several paths remain parallel and easy to miss.
  • Concurrency/lifecycle: routine-load ALTER serialization was improved, but existing threads still identify validation/replay paths that can leave persisted jobs in an invalid state; no new distinct concurrency issue found in this pass.
  • Configuration/compatibility: the marker format changes persisted skip-bitmap semantics; the current gating is still insufficient per the existing compatibility threads and must be resolved before merge.
  • Parallel code paths: stream load, routine load, load-v2, cloud/non-cloud rowset builders, and schema-change enable paths all need consistent validation; existing threads identify remaining mismatches.
  • Test coverage/results: many tests were added, but existing review comments request additional negative/replay/compatibility coverage. I did not run tests in this review environment.
  • Observability/performance: no additional observability issue found beyond the existing marker-size amplification thread, which appears addressed with a total-byte cap in current code.
  • Transaction/persistence/data correctness: existing routine-load image/edit-log persistence and BE marker compatibility findings are blocking because they can cause accepted metadata to replay incorrectly or old BEs to misinterpret persisted rowset data.

User focus: no additional user-provided review focus was specified.

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169231 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit aaef4cc98f53001e7814561f7604a225a7e8b0f5, data reload: false

query5	4323	649	504	504
query6	340	223	201	201
query7	4234	584	318	318
query8	316	231	227	227
query9	8821	4059	4038	4038
query10	449	346	301	301
query11	5790	2508	2233	2233
query12	189	134	126	126
query13	1293	631	452	452
query14	6170	5409	5081	5081
query14_1	4388	4375	4343	4343
query15	220	204	186	186
query16	1058	478	445	445
query17	1160	729	604	604
query18	2739	491	355	355
query19	224	209	170	170
query20	140	137	131	131
query21	224	148	125	125
query22	13601	13606	13371	13371
query23	17188	16356	16016	16016
query23_1	16229	16122	16342	16122
query24	7346	1771	1307	1307
query24_1	1311	1324	1289	1289
query25	556	469	419	419
query26	1322	317	171	171
query27	2661	529	348	348
query28	4305	1953	1983	1953
query29	981	627	498	498
query30	310	235	190	190
query31	1137	1067	942	942
query32	89	74	75	74
query33	535	351	298	298
query34	1161	1163	625	625
query35	758	783	665	665
query36	1295	1292	1108	1108
query37	154	112	94	94
query38	3223	3149	3033	3033
query39	935	933	900	900
query39_1	874	876	877	876
query40	226	153	129	129
query41	66	76	64	64
query42	110	109	109	109
query43	326	329	300	300
query44	
query45	206	205	199	199
query46	1117	1169	701	701
query47	2280	2302	2164	2164
query48	415	411	297	297
query49	640	521	388	388
query50	984	357	244	244
query51	4285	4316	4255	4255
query52	105	104	96	96
query53	253	287	208	208
query54	322	274	249	249
query55	91	88	92	88
query56	308	317	315	315
query57	1389	1374	1310	1310
query58	290	274	273	273
query59	1598	1648	1429	1429
query60	316	327	330	327
query61	158	152	155	152
query62	661	623	563	563
query63	240	195	202	195
query64	2346	802	644	644
query65	
query66	1674	478	350	350
query67	29332	29975	29816	29816
query68	
query69	470	341	308	308
query70	998	1016	952	952
query71	312	280	283	280
query72	2946	2657	2660	2657
query73	796	785	421	421
query74	5118	4868	4759	4759
query75	2668	2567	2266	2266
query76	2242	1152	787	787
query77	409	410	334	334
query78	12080	12097	11490	11490
query79	1350	1005	739	739
query80	649	550	482	482
query81	451	275	231	231
query82	1372	160	119	119
query83	373	291	252	252
query84	278	142	110	110
query85	890	554	444	444
query86	386	340	329	329
query87	3414	3360	3218	3218
query88	3583	2692	2657	2657
query89	439	389	360	360
query90	1855	181	186	181
query91	175	165	141	141
query92	83	78	73	73
query93	1505	1421	897	897
query94	529	364	320	320
query95	685	471	345	345
query96	1088	821	325	325
query97	2682	2729	2551	2551
query98	242	228	228	228
query99	1114	1081	973	973
Total cold run time: 251934 ms
Total hot run time: 169231 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 64.11% (584/911) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.55% (20692/38637)
Line Coverage 37.21% (195721/525942)
Region Coverage 33.60% (153333/456286)
Branch Coverage 34.61% (66847/193122)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 78.82% (201/255) 🎉
Increment coverage report
Complete coverage report

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 30779 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit c59e3952a50c2f0fd505d4606c20213ff17c7021, data reload: false

------ Round 1 ----------------------------------
orders	Doris	NULL	NULL	0	0	0	NULL	0	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	17235	3829	3792	3792
q2	q3	10581	1365	795	795
q4	4676	468	350	350
q5	7835	2237	2085	2085
q6	243	174	137	137
q7	944	777	629	629
q8	9414	1689	1590	1590
q9	5337	4906	4870	4870
q10	6402	2072	1799	1799
q11	449	275	247	247
q12	638	424	287	287
q13	18148	3391	2747	2747
q14	262	259	232	232
q15	q16	810	782	706	706
q17	992	965	939	939
q18	6973	5667	5558	5558
q19	1149	1308	1063	1063
q20	513	401	264	264
q21	5725	2555	2384	2384
q22	440	363	305	305
Total cold run time: 98766 ms
Total hot run time: 30779 ms

----- Round 2, with runtime_filter_mode=off -----
orders	Doris	NULL	NULL	150000000	42	6422171781	NULL	22778155	NULL	NULL	2023-12-26 18:27:23	2023-12-26 18:42:55	NULL	utf-8	NULL	NULL	
============================================
q1	4175	4084	4089	4084
q2	q3	4471	4908	4277	4277
q4	2099	2169	1397	1397
q5	4384	4265	4258	4258
q6	226	172	129	129
q7	1725	1840	1680	1680
q8	2544	2188	2081	2081
q9	7646	7747	7718	7718
q10	4542	4446	4043	4043
q11	562	409	378	378
q12	733	729	543	543
q13	3230	3687	2992	2992
q14	295	311	275	275
q15	q16	693	746	712	712
q17	1315	1309	1308	1308
q18	8102	7299	7184	7184
q19	1112	1065	1077	1065
q20	2198	2208	1930	1930
q21	5264	4578	4404	4404
q22	523	486	417	417
Total cold run time: 55839 ms
Total hot run time: 50875 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 169020 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit c59e3952a50c2f0fd505d4606c20213ff17c7021, data reload: false

query5	4320	647	548	548
query6	332	228	201	201
query7	4223	580	296	296
query8	327	228	219	219
query9	8824	3967	3978	3967
query10	449	335	298	298
query11	5805	2353	2205	2205
query12	182	127	122	122
query13	1301	613	406	406
query14	5981	5346	5051	5051
query14_1	4361	4374	4301	4301
query15	208	204	180	180
query16	1000	445	423	423
query17	1113	705	589	589
query18	2460	485	345	345
query19	217	201	160	160
query20	135	128	125	125
query21	213	144	116	116
query22	13627	13448	13393	13393
query23	17162	16362	15964	15964
query23_1	16028	16057	16126	16057
query24	7428	1733	1271	1271
query24_1	1288	1274	1304	1274
query25	560	475	407	407
query26	1332	326	169	169
query27	2710	537	336	336
query28	4392	1960	1934	1934
query29	1004	630	482	482
query30	316	246	201	201
query31	1113	1056	935	935
query32	91	79	70	70
query33	541	372	284	284
query34	1175	1125	645	645
query35	755	777	654	654
query36	1353	1312	1156	1156
query37	151	98	85	85
query38	3196	3138	3069	3069
query39	927	916	905	905
query39_1	892	874	877	874
query40	241	143	126	126
query41	65	62	63	62
query42	114	110	106	106
query43	316	321	284	284
query44	
query45	203	193	190	190
query46	1055	1171	734	734
query47	2354	2328	2228	2228
query48	397	399	285	285
query49	622	480	385	385
query50	980	342	247	247
query51	4284	4253	4174	4174
query52	105	104	95	95
query53	256	280	202	202
query54	305	275	253	253
query55	90	88	86	86
query56	286	317	302	302
query57	1393	1391	1287	1287
query58	291	265	256	256
query59	1531	1614	1441	1441
query60	334	337	323	323
query61	178	177	175	175
query62	679	637	571	571
query63	245	203	207	203
query64	2478	871	679	679
query65	
query66	1741	483	384	384
query67	30022	29847	29811	29811
query68	
query69	465	338	304	304
query70	1062	1019	966	966
query71	315	283	270	270
query72	3003	2715	2349	2349
query73	820	784	439	439
query74	5082	4863	4714	4714
query75	2662	2574	2272	2272
query76	2185	1114	781	781
query77	395	406	332	332
query78	12107	12083	11621	11621
query79	1410	1014	747	747
query80	660	547	465	465
query81	458	280	240	240
query82	1300	154	120	120
query83	355	271	247	247
query84	288	137	111	111
query85	881	529	442	442
query86	411	361	358	358
query87	3376	3330	3257	3257
query88	3494	2620	2615	2615
query89	440	380	337	337
query90	1890	182	178	178
query91	178	168	140	140
query92	78	79	76	76
query93	1457	1369	829	829
query94	549	350	315	315
query95	684	378	361	361
query96	1078	721	336	336
query97	2662	2683	2572	2572
query98	237	230	226	226
query99	1107	1102	971	971
Total cold run time: 252147 ms
Total hot run time: 169020 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 64.11% (584/911) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 53.55% (20692/38637)
Line Coverage 37.21% (195701/525942)
Region Coverage 33.56% (153117/456286)
Branch Coverage 34.60% (66827/193122)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 92.76% (846/912) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.97% (27230/37837)
Line Coverage 55.34% (290285/524566)
Region Coverage 52.22% (240587/460701)
Branch Coverage 53.71% (104124/193852)

@hello-stephen
Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 67.18% (176/262) 🎉
Increment coverage report
Complete coverage report

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.

[Feature] Variant 类型的字段支持部分列更新

2 participants