Skip to content

[feature](storage) support change variant_doc_materialization_min_rows and vertical_compaction_num_columns_per_group - #61100

Merged
eldenmoon merged 1 commit into
apache:masterfrom
csun5285:feature/new-feature
Mar 12, 2026
Merged

eldenmoon merged 1 commit into
apache:masterfrom
csun5285:feature/new-feature

Conversation

@csun5285

@csun5285 csun5285 commented Mar 6, 2026 •

Copy link
Copy Markdown
Contributor

1. variant_doc_materialization_min_rows

  • Remove the restriction that prevented modifying this variant column property via ALTER TABLE MODIFY COLUMN.
  • This property controls the minimum row threshold for materializing variant sub-columns. The change is propagated via Light Schema Change.

2. vertical_compaction_num_columns_per_group

  • Allow modifying this table property via ALTER TABLE SET(...). This controls how many columns are merged in each group during vertical compaction.
  • For wide variant tables, reducing this value significantly reduces peak
    memory usage during compaction.

None

Check List (For Author)

  • Test

    • 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
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

@Thearas

Thearas commented Mar 6, 2026

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?

@csun5285

csun5285 commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

1 similar comment
@csun5285

csun5285 commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 33.33% (1/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.35% (1798/2266)
Line Coverage 64.54% (32216/49913)
Region Coverage 65.43% (16133/24656)
Branch Coverage 55.92% (8590/15362)

@doris-robot

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

------ Round 1 ----------------------------------
============================================
q1	17676	4460	4285	4285
q2	q3	10741	827	534	534
q4	4744	366	254	254
q5	8223	1245	1033	1033
q6	236	179	147	147
q7	821	828	674	674
q8	10930	1474	1369	1369
q9	6808	4774	4738	4738
q10	6645	1916	1666	1666
q11	473	272	247	247
q12	751	566	467	467
q13	18057	2970	2190	2190
q14	236	239	218	218
q15	952	818	819	818
q16	752	726	680	680
q17	710	835	449	449
q18	6057	5404	5336	5336
q19	1135	995	612	612
q20	512	513	394	394
q21	4854	1944	1486	1486
q22	391	336	266	266
Total cold run time: 101704 ms
Total hot run time: 27863 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4617	4630	4661	4630
q2	q3	3942	4340	3854	3854
q4	866	1186	748	748
q5	4061	4541	4308	4308
q6	182	174	142	142
q7	1733	1692	1624	1624
q8	2519	2790	2614	2614
q9	7527	7317	7316	7316
q10	3758	4019	3554	3554
q11	506	432	417	417
q12	481	599	447	447
q13	2696	3237	2630	2630
q14	292	296	268	268
q15	856	800	799	799
q16	706	769	719	719
q17	1169	1547	1359	1359
q18	7085	6934	6801	6801
q19	873	862	875	862
q20	2098	2167	2028	2028
q21	4009	3485	3265	3265
q22	440	426	384	384
Total cold run time: 50416 ms
Total hot run time: 48769 ms

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 153442 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 7b3cdb167587178fe64bce741b5aaf550d13ba4a, data reload: false

query5	4340	630	514	514
query6	342	217	220	217
query7	4206	472	275	275
query8	339	248	220	220
query9	8716	2737	2731	2731
query10	534	383	322	322
query11	7467	5877	5572	5572
query12	200	125	128	125
query13	1268	452	346	346
query14	5735	3875	3580	3580
query14_1	2866	2797	2843	2797
query15	205	194	176	176
query16	991	496	464	464
query17	1030	729	619	619
query18	2444	453	353	353
query19	215	209	183	183
query20	137	128	130	128
query21	234	147	129	129
query22	5014	4969	4793	4793
query23	15933	15598	15285	15285
query23_1	15410	16321	15943	15943
query24	7904	1796	1328	1328
query24_1	1288	1291	1292	1291
query25	610	562	483	483
query26	1584	314	187	187
query27	3582	541	324	324
query28	4748	1965	1981	1965
query29	969	582	512	512
query30	320	266	257	257
query31	1423	1362	1591	1362
query32	88	77	74	74
query33	521	344	293	293
query34	936	969	645	645
query35	673	701	598	598
query36	1105	1131	989	989
query37	131	95	82	82
query38	2936	2897	2952	2897
query39	897	865	856	856
query39_1	836	834	823	823
query40	225	155	137	137
query41	67	58	62	58
query42	297	302	304	302
query43	241	249	233	233
query44	
query45	194	191	186	186
query46	880	981	607	607
query47	2152	2114	2108	2108
query48	311	327	226	226
query49	629	458	384	384
query50	684	279	217	217
query51	4114	4099	4072	4072
query52	283	292	283	283
query53	290	331	283	283
query54	299	269	261	261
query55	92	88	84	84
query56	323	318	310	310
query57	1362	1337	1278	1278
query58	294	278	276	276
query59	1359	1433	1349	1349
query60	332	333	307	307
query61	149	148	143	143
query62	643	593	551	551
query63	309	278	274	274
query64	5080	1288	1001	1001
query65	
query66	1456	455	356	356
query67	16570	16427	16285	16285
query68	
query69	403	313	279	279
query70	957	936	907	907
query71	333	299	295	295
query72	2769	2660	2449	2449
query73	530	552	320	320
query74	10023	9887	9805	9805
query75	2852	2738	2463	2463
query76	2273	1033	662	662
query77	360	375	306	306
query78	11257	11354	10633	10633
query79	1118	796	612	612
query80	1344	639	543	543
query81	562	283	238	238
query82	1277	155	117	117
query83	336	262	237	237
query84	286	118	94	94
query85	940	475	453	453
query86	428	310	324	310
query87	3111	3102	3010	3010
query88	3569	2670	2662	2662
query89	416	376	351	351
query90	2040	178	175	175
query91	171	163	134	134
query92	74	75	72	72
query93	931	820	514	514
query94	638	304	295	295
query95	608	337	387	337
query96	626	518	232	232
query97	2458	2582	2413	2413
query98	233	226	221	221
query99	958	992	899	899
Total cold run time: 235079 ms
Total hot run time: 153442 ms

@doris-robot

Copy link
Copy Markdown

BE UT Coverage Report

Increment line coverage 82.81% (53/64) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.55% (19648/37386)
Line Coverage 36.18% (183416/507024)
Region Coverage 32.48% (142286/438103)
Branch Coverage 33.43% (61721/184654)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 82.81% (53/64) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.53% (26184/36608)
Line Coverage 54.31% (274507/505485)
Region Coverage 51.70% (228648/442251)
Branch Coverage 52.99% (98152/185230)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 68.09% (64/94) 🎉
Increment coverage report
Complete coverage report

@csun5285
csun5285 force-pushed the feature/new-feature branch from 7b3cdb1 to 45467b6 Compare March 9, 2026 04:32
@csun5285

csun5285 commented Mar 9, 2026

Copy link
Copy Markdown
Contributor Author

run buildall

@doris-robot

Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 33.33% (1/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.35% (1798/2266)
Line Coverage 64.51% (32200/49913)
Region Coverage 65.43% (16132/24656)
Branch Coverage 55.93% (8592/15362)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 32.98% (31/94) 🎉
Increment coverage report
Complete coverage report

@doris-robot

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

------ Round 1 ----------------------------------
============================================
q1	17601	4589	4309	4309
q2	q3	10645	802	520	520
q4	4685	367	258	258
q5	7545	1203	1015	1015
q6	177	177	148	148
q7	788	846	669	669
q8	9291	1526	1331	1331
q9	4857	4773	4762	4762
q10	6252	1934	1670	1670
q11	489	255	240	240
q12	690	569	470	470
q13	18036	2961	2171	2171
q14	236	232	215	215
q15	926	805	820	805
q16	757	718	683	683
q17	761	905	389	389
q18	6069	5436	5371	5371
q19	1113	1002	610	610
q20	498	507	418	418
q21	4377	2163	1494	1494
q22	402	346	293	293
Total cold run time: 96195 ms
Total hot run time: 27841 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4717	4566	4524	4524
q2	q3	3905	4348	3890	3890
q4	904	1233	774	774
q5	4082	4441	4352	4352
q6	189	178	137	137
q7	1760	1651	1552	1552
q8	2509	2822	2602	2602
q9	7675	7339	7284	7284
q10	4060	4030	3608	3608
q11	522	440	419	419
q12	491	622	469	469
q13	2733	3113	2290	2290
q14	282	298	279	279
q15	880	812	795	795
q16	736	737	713	713
q17	1132	1438	1383	1383
q18	7020	6917	6809	6809
q19	898	938	873	873
q20	2110	2188	2121	2121
q21	4007	3472	3350	3350
q22	452	428	388	388
Total cold run time: 51064 ms
Total hot run time: 48612 ms

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 153645 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 45467b6409bc90f11f2d9ca725e3bf225f33172e, data reload: false

query5	4335	645	530	530
query6	324	227	203	203
query7	4207	470	260	260
query8	333	251	244	244
query9	8749	2767	2772	2767
query10	521	387	370	370
query11	7388	5902	5666	5666
query12	192	127	132	127
query13	1267	451	355	355
query14	5751	3863	3616	3616
query14_1	2843	2841	2831	2831
query15	202	201	183	183
query16	997	484	470	470
query17	1113	729	623	623
query18	2456	447	361	361
query19	215	213	190	190
query20	135	131	131	131
query21	233	151	125	125
query22	4679	4908	5025	4908
query23	16006	15598	15431	15431
query23_1	15490	16108	15957	15957
query24	7271	1730	1299	1299
query24_1	1339	1305	1335	1305
query25	606	531	477	477
query26	1659	288	174	174
query27	3106	492	308	308
query28	4868	1994	2054	1994
query29	859	573	470	470
query30	307	251	212	212
query31	1348	1283	1233	1233
query32	85	72	76	72
query33	492	323	291	291
query34	921	930	559	559
query35	667	680	595	595
query36	1069	1133	970	970
query37	133	100	83	83
query38	2975	2934	2904	2904
query39	907	859	917	859
query39_1	817	827	837	827
query40	230	158	138	138
query41	61	58	57	57
query42	300	296	301	296
query43	254	250	223	223
query44	
query45	206	188	192	188
query46	866	986	608	608
query47	2118	2133	2032	2032
query48	303	311	226	226
query49	627	468	394	394
query50	693	278	225	225
query51	4170	4158	4047	4047
query52	288	291	286	286
query53	295	339	279	279
query54	301	287	270	270
query55	95	97	86	86
query56	336	331	316	316
query57	1372	1343	1258	1258
query58	293	285	277	277
query59	1303	1451	1330	1330
query60	325	351	322	322
query61	146	149	146	146
query62	631	597	523	523
query63	307	286	279	279
query64	5006	1261	974	974
query65	
query66	1463	454	345	345
query67	16465	16406	16419	16406
query68	
query69	389	313	298	298
query70	1008	973	992	973
query71	348	325	306	306
query72	2865	2710	2429	2429
query73	537	560	325	325
query74	10044	9982	9775	9775
query75	2861	2775	2472	2472
query76	2294	1027	670	670
query77	360	382	313	313
query78	11250	11401	10641	10641
query79	1122	797	596	596
query80	1318	615	548	548
query81	573	279	247	247
query82	983	155	118	118
query83	342	265	248	248
query84	253	122	102	102
query85	903	530	426	426
query86	427	300	310	300
query87	3204	3147	3035	3035
query88	3535	2643	2632	2632
query89	422	366	349	349
query90	2026	185	182	182
query91	165	157	135	135
query92	81	79	75	75
query93	909	858	510	510
query94	621	314	299	299
query95	593	339	316	316
query96	632	517	229	229
query97	2482	2507	2383	2383
query98	237	221	220	220
query99	1000	984	925	925
Total cold run time: 234051 ms
Total hot run time: 153645 ms

eldenmoon
eldenmoon previously approved these changes Mar 9, 2026

@eldenmoon eldenmoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Mar 9, 2026
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@eldenmoon eldenmoon changed the title [feature](variant) Optimize wide variant column [feature](storage) support change variant_doc_materialization_min_rows and vertical_compaction_num_columns_per_group Mar 9, 2026
@eldenmoon

Copy link
Copy Markdown
Member

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review Summary

This PR adds support for dynamically changing variant_doc_materialization_min_rows (via ALTER TABLE MODIFY COLUMN) and vertical_compaction_num_columns_per_group (via ALTER TABLE SET(...)) as per-table properties. The implementation is thorough and covers all necessary code paths across FE, BE, Cloud, protobuf, and thrift layers.

Critical Checkpoint Conclusions

1. Goal and Test Coverage: The stated goal is achieved. Both features have regression tests. The variant_doc_materialization_min_rows test verifies the end-to-end flow including compaction behavior. The vertical_compaction_num_columns_per_group test uses debug points to verify the value reaches BE compaction logic. Test coverage is good overall.

2. Modification scope: The change is focused and touches only the necessary files. All CreateReplicaTask call sites (6 in non-cloud, 4 in cloud mode) and all vertical_split_columns call sites (2) have been updated. The protobuf/thrift/cloud.proto definitions are correctly added.

3. Concurrency: The new _vertical_compaction_num_columns_per_group field in TabletMeta follows the same unlocked getter/setter pattern as existing compaction config fields (_time_series_compaction_*). This is consistent with the class design where concurrency control is handled at the Tablet level. No new concurrency concerns.

4. Lifecycle management: No special lifecycle concerns. The field is a simple scalar.

5. Configuration items: The property is dynamically changeable via ALTER TABLE SET(...) and correctly propagated to BE via UpdateTabletMetaInfoTask. Cloud mode sync in CloudTablet::sync_meta() is also handled.

6. Incompatible changes / Upgrade compatibility: The protobuf fields have [default = 5] which matches the existing global config default. Thrift fields also have default = 5. During rolling upgrades, old BEs that don't understand the new thrift field will use the protobuf default of 5, which matches the previous config::vertical_compaction_num_columns_per_group behavior. No incompatibility.

7. Parallel code paths: Both cloud and non-cloud paths are updated. The config::vertical_compaction_num_columns_per_group global config is effectively superseded by the per-tablet property (config declaration retained but no longer referenced in code paths).

8. Observability: No new metrics or logging needed for this configuration change.

9. EditLog / Persistence: The property is persisted through TableProperty (Gson serialized), rebuilt during gsonPostProcess(), and included in modifyTableProperties chain. Correct.

10. Data writes / Transactionality: Not applicable - this is a configuration change, not a data write path modification.

11. FE-BE variable passing: All paths verified: CreateReplicaTask.toThrift(), UpdateTabletMetaInfoTask.toThrift(), cloud TabletMetaInfoPB, and TCreateTabletReq all correctly pass the new field.

12. Performance: No performance concerns. The per-tablet property is read once into a local variable at compaction time.

Issues Found

See inline comments for details. Main findings:

  • Minor: Stale/misleading comments in variant test file (references "min_rows=5" when it should say "min_rows=10")
  • Minor: Indentation inconsistency in CloudSchemaChangeJobV2.java and CloudInternalCatalog.java
  • Minor: Variant test drops table at end (violates regression test standards)
  • Nitpick: Both test files use def tableName pattern

);
"""

// Verify SHOW CREATE TABLE shows min_rows=5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Stale comments: Lines 37, 43, and 56 reference min_rows=5 but the table is created with min_rows=10. These are copy-paste remnants. The actual code assertions are correct (checking for 10), but the comments are misleading.

Suggested fixes:

  • Line 37: // Verify SHOW CREATE TABLE shows min_rows=10
  • Line 43: // Verify tablet meta shows min_rows=10
  • Line 56: // Expect: only k and v columns, NO sub-columns extracted (3 rows < min_rows=10)


// Cleanup
sql """ DROP TABLE IF EXISTS ${tableName} """
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Per regression test standards: tables should not be dropped at the end of tests (to preserve the environment for debugging). The DROP TABLE IF EXISTS at the beginning of the test (line 21) is correct, but this cleanup drop at the end should be removed.

columnSeqMapping);
columnSeqMapping,
tbl.getVerticalCompactionNumColumnsPerGroup());
requestBuilder.addTabletMetas(builder);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Indentation inconsistency. This line has extra leading spaces compared to the columnSeqMapping, argument above it. Should align with the other arguments at the same indentation level.

@csun5285

Copy link
Copy Markdown
Contributor Author

run buildall

@github-actions github-actions Bot removed the approved Indicates a PR has been approved by one committer. label Mar 12, 2026
@doris-robot

Copy link
Copy Markdown

Cloud UT Coverage Report

Increment line coverage 33.33% (1/3) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 79.31% (1798/2267)
Line Coverage 64.58% (32257/49947)
Region Coverage 65.52% (16158/24662)
Branch Coverage 55.88% (8600/15390)

@doris-robot

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

------ Round 1 ----------------------------------
============================================
q1	17688	4538	4414	4414
q2	q3	10724	795	535	535
q4	4718	368	249	249
q5	8174	1207	1022	1022
q6	229	177	149	149
q7	821	845	674	674
q8	10666	1478	1371	1371
q9	6749	4925	4782	4782
q10	6528	1931	1665	1665
q11	475	259	239	239
q12	763	595	482	482
q13	18076	2997	2221	2221
q14	230	232	230	230
q15	943	791	824	791
q16	753	729	702	702
q17	709	871	412	412
q18	6061	5542	5275	5275
q19	1133	1020	611	611
q20	497	497	390	390
q21	4699	2006	1575	1575
q22	384	318	281	281
Total cold run time: 101020 ms
Total hot run time: 28070 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4844	4656	4690	4656
q2	q3	3910	4409	3855	3855
q4	898	1230	777	777
q5	4105	4458	4374	4374
q6	185	177	141	141
q7	1803	1616	1545	1545
q8	2543	2778	2655	2655
q9	7703	7361	7398	7361
q10	3862	4168	3649	3649
q11	501	436	414	414
q12	492	597	455	455
q13	2909	3245	2331	2331
q14	291	306	303	303
q15	891	836	848	836
q16	748	795	773	773
q17	1179	1411	1353	1353
q18	7278	6828	6653	6653
q19	853	875	874	874
q20	2085	2205	2035	2035
q21	4005	3591	3369	3369
q22	447	465	471	465
Total cold run time: 51532 ms
Total hot run time: 48874 ms

@doris-robot

Copy link
Copy Markdown
TPC-DS: Total hot run time: 153978 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 93658449533359060d8bb64993d091aebe524bac, data reload: false

query5	4348	639	519	519
query6	328	226	210	210
query7	4206	462	276	276
query8	353	273	235	235
query9	8703	2714	2740	2714
query10	496	409	341	341
query11	7454	6003	5663	5663
query12	194	127	125	125
query13	1245	448	350	350
query14	5738	3872	3596	3596
query14_1	2836	2771	2851	2771
query15	207	199	180	180
query16	992	481	452	452
query17	876	703	600	600
query18	2452	433	378	378
query19	211	207	173	173
query20	132	128	128	128
query21	226	133	117	117
query22	5089	4987	4954	4954
query23	16837	16084	15845	15845
query23_1	16228	15878	15838	15838
query24	7407	1690	1279	1279
query24_1	1322	1292	1293	1292
query25	608	536	489	489
query26	2457	291	168	168
query27	2861	500	293	293
query28	4519	1879	1873	1873
query29	887	597	515	515
query30	319	252	215	215
query31	1379	1289	1241	1241
query32	86	75	72	72
query33	522	346	295	295
query34	919	942	567	567
query35	669	699	602	602
query36	1086	1135	982	982
query37	141	104	86	86
query38	2939	2980	2971	2971
query39	900	884	857	857
query39_1	833	840	836	836
query40	243	162	140	140
query41	69	66	66	66
query42	307	313	306	306
query43	248	254	223	223
query44	
query45	200	194	191	191
query46	895	991	617	617
query47	2117	2155	2043	2043
query48	332	348	234	234
query49	642	473	405	405
query50	683	286	215	215
query51	4221	4140	4058	4058
query52	292	299	283	283
query53	297	346	288	288
query54	328	330	262	262
query55	96	92	86	86
query56	320	320	304	304
query57	1371	1338	1269	1269
query58	283	279	273	273
query59	1360	1501	1254	1254
query60	340	355	329	329
query61	151	145	143	143
query62	624	591	555	555
query63	311	285	277	277
query64	5145	1264	983	983
query65	
query66	1451	479	367	367
query67	16470	16494	16305	16305
query68	
query69	399	311	280	280
query70	1073	958	958	958
query71	336	307	305	305
query72	2763	2691	2419	2419
query73	545	568	334	334
query74	10022	9999	9849	9849
query75	2868	2823	2476	2476
query76	2288	1052	675	675
query77	367	405	308	308
query78	11310	11456	10748	10748
query79	1677	813	624	624
query80	1363	625	553	553
query81	567	279	252	252
query82	988	158	119	119
query83	342	265	245	245
query84	299	124	100	100
query85	910	479	437	437
query86	431	297	291	291
query87	3151	3108	3003	3003
query88	3538	2672	2654	2654
query89	440	371	352	352
query90	2025	191	186	186
query91	167	169	142	142
query92	74	73	72	72
query93	988	838	505	505
query94	648	325	299	299
query95	587	337	385	337
query96	648	519	232	232
query97	2552	2489	2410	2410
query98	233	229	229	229
query99	1014	1015	910	910
Total cold run time: 236736 ms
Total hot run time: 153978 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 84.29% (59/70) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.62% (19681/37402)
Line Coverage 36.21% (183564/506947)
Region Coverage 32.34% (141733/438290)
Branch Coverage 33.51% (61872/184659)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 84.29% (59/70) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 73.15% (26778/36607)
Line Coverage 56.40% (284927/505225)
Region Coverage 53.54% (236806/442338)
Branch Coverage 55.37% (102516/185141)

@eldenmoon eldenmoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Mar 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR approved by at least one committer and no changes requested.

@dataroaring dataroaring left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@eldenmoon
eldenmoon merged commit 4eba7f9 into apache:master Mar 12, 2026
30 of 32 checks passed
csun5285 added a commit to csun5285/doris that referenced this pull request Mar 17, 2026
…ws` and `vertical_compaction_num_columns_per_group` (apache#61100)

cherry-pick from upstream master 4eba7f9
csun5285 added a commit to csun5285/doris that referenced this pull request Mar 17, 2026
…ws` and `vertical_compaction_num_columns_per_group` (apache#61100)
csun5285 added a commit to csun5285/doris that referenced this pull request Mar 17, 2026
…ws` and `vertical_compaction_num_columns_per_group` (apache#61100)
yiguolei pushed a commit that referenced this pull request Mar 18, 2026
…ws` and `vertical_compaction_num_columns_per_group` (#61100) (#61441)

pick from master #61100
csun5285 added a commit to csun5285/doris that referenced this pull request Nov 9, 2026
… let MODIFY COLUMN change the row threshold

### What problem does this PR solve?

Issue Number: None

Related PR: apache#69812, apache#61100

Problem Summary:

Two choices of the earlier commits went further than renaming the properties:

- `variant_sparse_shard_count` was written into both stored shard fields, `variantSparseHashShardCount`
  and `variantDocShardCount`, and MODIFY COLUMN compared the field of the column's mode instead of
  both fields. The property only has a new name: with doc mode the value belongs to the doc shard
  field and without it to the sparse shard field, as each mode had its own property before. The
  parser now fills that field only and leaves the other one 0, which is what every released version
  stores, so `Column.checkSchemaChangeAllowed` compares the two fields again as master does. The BE
  and SHOW CREATE TABLE already read the field of the mode.
- MODIFY COLUMN refused any change of `variant_subcolumn_extraction_min_rows`, while apache#61100 lets it
  change `variant_doc_materialization_min_rows`. It can change again, with and without doc mode,
  except on a column without doc mode created before this change (a V1 column): its BE ignores the
  threshold, because its count-0 compaction branch cannot extract paths that only the sparse column
  holds, so a value stored there would do nothing. test_variant_modify_doc_materialization_min_rows
  has its steps from master again (an ALTER lowers the threshold and the next compaction extracts the
  old paths), and test_variant_tuning_properties raises the threshold with an ALTER again. The BE
  comment and the UT description of a compaction below the threshold name the ALTER again; the BE
  code does not change.

### Release note

MODIFY COLUMN can change `variant_subcolumn_extraction_min_rows`, but not on a column without doc
mode created before the upgrade.

### Check List (For Author)

- Test: Unit Test, Regression test
    - FE UT: the 11 classes that the VARIANT properties touch (PropertyAnalyzerTest,
      VariantSerializeTypeDdlTest, TypeTest, ColumnTest, SchemaChangeHandlerTest, DataTypeTest,
      NereidsParserTest, VariantLoadParseInjectionTest, CreateTableCommandTest,
      ShowCreateTableCommandTest, SessionVariablesTest), 286 tests, 0 failures.
    - Regression: test_variant_tuning_properties and test_variant_modify_doc_materialization_min_rows,
      regenerated by running them (the latter extracts the same subcolumns as on master); every
      enabled suite of variant_p0 (187), where only outfile_csv_variant_doc_value fails because it
      needs S3 credentials; six suites outside variant_p0 that create VARIANT tables;
      check_before_quit, which recreates every table from its SHOW CREATE TABLE and compares.
- Behavior changed: Yes. MODIFY COLUMN can change the row threshold again.
- Does this need documentation: Yes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.1.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants