Skip to content

[feature](bucket) Support custom distribution_hash_type for Hash Bucketing - #66477

Open
zghong wants to merge 21 commits into
apache:masterfrom
zghong:feat/distribution_hash_type
Open

zghong wants to merge 21 commits into
apache:masterfrom
zghong:feat/distribution_hash_type

Conversation

@zghong

@zghong zghong commented Aug 5, 2026

Copy link
Copy Markdown

What problem does this PR solve?

Issue Number: close #66231

Problem Summary:

Hash Bucketing previously supported only the CRC32 hash function to map a row to its bucket. There was no way for users to choose a different bucketing scheme, which prevents scenarios (e.g. bucket pruning / colocation with external systems) that rely on a plain identity mapping of the bucket key, as shown in #66231.

This PR introduces a table-level distribution_hash_type property for Hash Bucketing tables, supporting two values:

  • crc32 (default, keeps existing behavior), means crc32(key) % bucket_num.
  • identity (map rows to buckets by the raw key value), means key % bucket_num.

Main changes:

  • FE: parse and validate the new distribution_hash_type property in PropertyAnalyzer; carry the hash type through HashDistributionInfo, HashDistributionDesc, ColocateGroupSchema, DataPartition, DistributionSpecHash and related create-table / colocate paths; a new FeMetaVersion is added for metadata persistence. ADD PARTITION now inherits the table hash type.
  • Nereids: the optimizer is taught to recognize the non-CRC32 (identity) hash type when reasoning about distribution properties, so shuffle can be eliminated and bucket pruning (HashDistributionPruner, PruneOlapScanTablet) still works correctly for identity buckets.
  • BE: TDistributionHashType is added to thrift and threaded through the exchange / local-exchange sink operators and the tablet-sink partitioner so that the backend uses the same bucketing function as the FE plan, keeping FE/BE bucketing consistent. An identity partitioner is implemented.
  • thrift: add TDistributionHashType and propagate the field in Descriptors, Partitions, PlanNodes and Types.

Before this PR: only CRC32 bucketing was available.

After this PR: users can create Hash Bucketing tables with "distribution_hash_type" = "identity", and FE plan optimization plus BE data sink produce consistent bucketing results. And more hash functions can be extended in the future.

Release note

Support a new table property distribution_hash_type for Hash Bucketing tables. It accepts crc32 (default) and identity now, allowing users to choose the hash function used to map rows to buckets.

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. A new distribution_hash_type property is added; but default behavior (crc32) is unchanged.
  • Does this need documentation?

Check List (For Reviewer who merge this PR)

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

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

@zghong

zghong commented Aug 5, 2026

Copy link
Copy Markdown
Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17594	3930	3917	3917
q2	2041	339	202	202
q3	10235	1474	809	809
q4	4685	475	338	338
q5	7625	859	575	575
q6	180	168	135	135
q7	755	785	613	613
q8	9384	1600	1659	1600
q9	5350	4130	4117	4117
q10	6759	1716	1350	1350
q11	524	351	319	319
q12	713	585	460	460
q13	18077	3286	2765	2765
q14	270	258	234	234
q15	q16	737	726	668	668
q17	1040	884	1016	884
q18	6632	5654	5544	5544
q19	1198	1321	1032	1032
q20	757	684	572	572
q21	5398	2865	2683	2683
q22	459	377	336	336
Total cold run time: 100413 ms
Total hot run time: 29153 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5010	4662	4623	4623
q2	290	326	219	219
q3	5048	5552	4617	4617
q4	2203	2289	1434	1434
q5	4540	4694	4391	4391
q6	231	177	126	126
q7	1866	1834	1516	1516
q8	2333	2052	2056	2052
q9	7218	6940	6717	6717
q10	4250	4196	3815	3815
q11	512	373	345	345
q12	704	713	503	503
q13	2952	3235	2767	2767
q14	279	294	254	254
q15	q16	659	686	592	592
q17	1290	1271	1246	1246
q18	12124	11050	11775	11050
q19	1120	1098	1092	1092
q20	2199	2193	1905	1905
q21	5292	4571	4625	4571
q22	533	456	396	396
Total cold run time: 60653 ms
Total hot run time: 54231 ms

@hello-stephen

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

query5	4329	600	463	463
query6	463	226	216	216
query7	4874	563	339	339
query8	318	160	149	149
query9	8797	3998	4011	3998
query10	505	395	311	311
query11	5895	2183	1981	1981
query12	159	101	97	97
query13	1272	586	417	417
query14	6052	4276	4012	4012
query14_1	3785	3804	3768	3768
query15	196	196	175	175
query16	982	461	435	435
query17	915	708	535	535
query18	2431	479	340	340
query19	209	186	147	147
query20	104	103	103	103
query21	229	153	139	139
query22	13014	12938	12857	12857
query23	15895	14945	14516	14516
query23_1	14666	14749	14752	14749
query24	7644	1707	1245	1245
query24_1	1227	1273	1258	1258
query25	562	470	389	389
query26	1325	349	217	217
query27	2593	595	392	392
query28	4578	1989	1968	1968
query29	1088	616	477	477
query30	350	261	225	225
query31	1189	1114	1072	1072
query32	115	66	63	63
query33	517	312	254	254
query34	1207	1110	626	626
query35	745	740	649	649
query36	768	770	707	707
query37	157	109	95	95
query38	1854	1763	1665	1665
query39	822	826	799	799
query39_1	788	794	793	793
query40	255	159	140	140
query41	66	65	62	62
query42	92	94	93	93
query43	318	321	278	278
query44	1444	742	750	742
query45	184	172	175	172
query46	1030	1183	707	707
query47	1534	1514	1444	1444
query48	418	434	312	312
query49	577	408	288	288
query50	1068	441	344	344
query51	10849	10369	10390	10369
query52	85	87	75	75
query53	257	279	211	211
query54	280	229	219	219
query55	75	74	67	67
query56	308	305	301	301
query57	1027	1001	929	929
query58	297	270	245	245
query59	1535	1624	1368	1368
query60	311	275	256	256
query61	152	184	151	151
query62	408	320	268	268
query63	241	198	214	198
query64	2867	1024	850	850
query65	3912	3836	3767	3767
query66	1824	472	364	364
query67	28523	28182	27342	27342
query68	3474	1603	968	968
query69	424	296	274	274
query70	862	809	743	743
query71	377	349	311	311
query72	3071	2679	2448	2448
query73	883	735	434	434
query74	4677	4485	4310	4310
query75	2383	2376	2022	2022
query76	2456	1158	786	786
query77	362	385	284	284
query78	11141	10971	10704	10704
query79	1366	1086	774	774
query80	778	564	516	516
query81	467	339	289	289
query82	618	185	139	139
query83	423	334	297	297
query84	329	170	138	138
query85	1116	614	518	518
query86	367	233	226	226
query87	1976	1936	1840	1840
query88	3764	2780	2796	2780
query89	398	327	278	278
query90	1839	209	200	200
query91	205	195	167	167
query92	63	59	58	58
query93	1545	1517	1051	1051
query94	621	371	311	311
query95	793	607	507	507
query96	1001	755	353	353
query97	2457	2466	2316	2316
query98	200	189	182	182
query99	742	728	615	615
Total cold run time: 253749 ms
Total hot run time: 166066 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 23.98 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit f7cd8d5c88bfe2cd30ca929f66810365f0cb7f7d, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.05	0.05
query3	0.26	0.14	0.14
query4	1.60	0.14	0.14
query5	0.24	0.22	0.23
query6	1.17	0.82	0.82
query7	0.05	0.01	0.01
query8	0.06	0.04	0.04
query9	0.40	0.31	0.32
query10	0.55	0.59	0.55
query11	0.20	0.14	0.14
query12	0.18	0.15	0.14
query13	0.47	0.46	0.48
query14	1.01	1.00	1.02
query15	0.60	0.59	0.59
query16	0.32	0.33	0.31
query17	1.14	1.12	1.11
query18	0.21	0.20	0.20
query19	2.06	1.97	1.93
query20	0.02	0.01	0.01
query21	15.44	0.21	0.14
query22	4.89	0.06	0.05
query23	16.11	0.31	0.12
query24	2.95	0.40	0.34
query25	0.10	0.07	0.05
query26	0.73	0.21	0.14
query27	0.03	0.03	0.05
query28	3.55	0.77	0.34
query29	12.51	4.01	3.17
query30	0.32	0.18	0.19
query31	2.77	0.55	0.32
query32	3.22	0.58	0.50
query33	3.27	3.23	3.16
query34	15.51	3.93	3.25
query35	3.25	3.25	3.19
query36	0.55	0.43	0.44
query37	0.10	0.07	0.07
query38	0.06	0.04	0.04
query39	0.05	0.03	0.03
query40	0.18	0.16	0.15
query41	0.09	0.04	0.03
query42	0.04	0.04	0.03
query43	0.05	0.04	0.04
Total cold run time: 96.42 s
Total hot run time: 23.98 s

zghong added 7 commits August 31, 2026 01:21
…ash_type

# Conflicts:
#	be/src/exec/partitioner/partitioner.h
#	fe/fe-core/src/main/java/org/apache/doris/planner/HashDistributionPruner.java
#	fe/fe-core/src/test/java/org/apache/doris/planner/HashDistributionPrunerTest.java
Carry the effective storage hash type through FE-planned and BE-native local
bucket exchanges. Add fragment protocol metadata and execution-version gating
so older backends cannot silently execute IDENTITY layouts as CRC32.
@zghong

zghong commented Sep 2, 2026

Copy link
Copy Markdown
Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 74.80% (92/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.16% (34662/45511)
Line Coverage 61.24% (391316/638983)
Region Coverage 57.34% (328335/572604)
Branch Coverage 58.16% (149883/257729)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 76.80% (139/181) 🎉
Increment coverage report
Complete coverage report

@zghong

zghong commented Sep 3, 2026

Copy link
Copy Markdown
Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.69% (2055/2645)
Line Coverage 65.71% (37552/57152)
Region Coverage 52.88% (34990/66167)
Branch Coverage 56.41% (11256/19954)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17613	3093	3081	3081
q2	2090	255	223	223
q3	10242	858	515	515
q4	4671	248	201	201
q5	7674	610	388	388
q6	134	116	93	93
q7	528	520	386	386
q8	9236	948	913	913
q9	3477	2406	2405	2405
q10	6497	831	720	720
q11	415	200	182	182
q12	632	258	196	196
q13	18120	1530	1173	1173
q14	160	145	142	142
q15	q16	448	397	364	364
q17	1345	896	864	864
q18	3154	2261	2254	2254
q19	1134	929	741	741
q20	360	283	212	212
q21	5308	1614	1889	1614
q22	327	276	234	234
Total cold run time: 93565 ms
Total hot run time: 16901 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3444	3408	3407	3407
q2	519	411	382	382
q3	2195	2255	2143	2143
q4	1201	1178	900	900
q5	2174	2127	2111	2111
q6	171	120	89	89
q7	1060	918	861	861
q8	1612	1422	1424	1422
q9	3108	3097	3070	3070
q10	1841	1824	1609	1609
q11	362	273	258	258
q12	454	434	348	348
q13	1480	1536	1146	1146
q14	170	162	157	157
q15	q16	395	402	359	359
q17	3581	3247	3174	3174
q18	4854	4434	4738	4434
q19	841	860	866	860
q20	1004	961	837	837
q21	3880	3190	3317	3190
q22	396	343	326	326
Total cold run time: 34742 ms
Total hot run time: 31083 ms

@hello-stephen

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

query5	4238	409	345	345
query6	390	133	129	129
query7	4953	432	236	236
query8	294	129	119	119
query9	8712	2874	2907	2874
query10	419	213	181	181
query11	5387	1034	899	899
query12	115	69	75	69
query13	1200	461	310	310
query14	6106	2206	2081	2081
query14_1	1978	1964	1990	1964
query15	182	125	114	114
query16	927	373	363	363
query17	821	456	368	368
query18	2343	335	251	251
query19	170	144	113	113
query20	75	71	70	70
query21	202	103	97	97
query22	5294	5367	5258	5258
query23	6640	6269	6110	6110
query23_1	6149	6161	5985	5985
query24	7283	1126	781	781
query24_1	786	782	783	782
query25	444	308	258	258
query26	1226	231	132	132
query27	2782	427	266	266
query28	4664	1517	1532	1517
query29	939	450	365	365
query30	250	157	133	133
query31	825	403	345	345
query32	128	79	74	74
query33	471	231	198	198
query34	1021	842	482	482
query35	398	414	351	351
query36	576	555	526	526
query37	122	81	69	69
query38	1019	846	815	815
query39	541	470	465	465
query39_1	451	460	479	460
query40	210	94	80	80
query41	62	57	57	57
query42	80	74	74	74
query43	245	248	214	214
query44	1045	554	561	554
query45	131	103	100	100
query46	817	887	526	526
query47	749	744	722	722
query48	303	320	219	219
query49	530	243	182	182
query50	735	269	189	189
query51	8205	7974	8095	7974
query52	74	74	60	60
query53	199	199	146	146
query54	235	187	175	175
query55	73	57	58	57
query56	203	214	231	214
query57	685	668	657	657
query58	189	164	151	151
query59	1211	1256	1081	1081
query60	237	195	176	176
query61	121	112	121	112
query62	363	211	188	188
query63	177	148	137	137
query64	2710	697	583	583
query65	1650	1552	1589	1552
query66	1907	264	221	221
query67	9708	9905	9469	9469
query68	2995	1242	765	765
query69	369	230	189	189
query70	666	614	610	610
query71	257	178	170	170
query72	2391	1727	1597	1597
query73	656	603	321	321
query74	2017	1226	1128	1128
query75	1191	1106	967	967
query76	2385	732	528	528
query77	249	258	214	214
query78	3983	3758	3242	3242
query79	2332	870	576	576
query80	1592	358	278	278
query81	499	154	132	132
query82	613	137	98	98
query83	283	211	189	189
query84	298	116	89	89
query85	795	365	292	292
query86	407	183	188	183
query87	1027	964	896	896
query88	2793	2115	2103	2103
query89	284	200	178	178
query90	2001	130	119	119
query91	132	119	98	98
query92	78	72	70	70
query93	1586	1099	692	692
query94	625	241	227	227
query95	562	323	229	229
query96	765	589	278	278
query97	1066	1039	1007	1007
query98	172	133	138	133
query99	418	344	316	316
Total cold run time: 178277 ms
Total hot run time: 81949 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 14.7 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit e920dbd3f53c39152b0a9434a1ced47538db38a4, data reload: false

query1	0.01	0.00	0.01
query2	0.08	0.03	0.03
query3	0.25	0.11	0.11
query4	1.61	0.10	0.09
query5	0.17	0.16	0.15
query6	1.31	0.66	0.70
query7	0.03	0.00	0.01
query8	0.05	0.03	0.04
query9	0.30	0.21	0.21
query10	0.34	0.36	0.34
query11	0.16	0.11	0.11
query12	0.16	0.12	0.11
query13	0.30	0.32	0.31
query14	0.45	0.44	0.45
query15	0.36	0.33	0.35
query16	0.21	0.24	0.24
query17	0.69	0.70	0.70
query18	0.19	0.17	0.17
query19	1.19	1.16	1.16
query20	0.01	0.01	0.01
query21	15.45	0.16	0.11
query22	5.10	0.04	0.05
query23	16.19	0.25	0.10
query24	2.93	0.35	0.26
query25	0.12	0.04	0.04
query26	0.75	0.17	0.11
query27	0.03	0.02	0.03
query28	3.64	0.55	0.26
query29	12.48	3.16	2.56
query30	0.26	0.11	0.12
query31	2.76	0.37	0.18
query32	3.51	0.30	0.23
query33	1.43	1.46	1.55
query34	15.36	2.18	1.78
query35	1.77	1.74	1.74
query36	0.46	0.29	0.28
query37	0.07	0.04	0.05
query38	0.05	0.04	0.03
query39	0.04	0.02	0.02
query40	0.11	0.09	0.07
query41	0.08	0.03	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 90.54 s
Total hot run time: 14.7 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 97.56% (120/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.26% (34642/45427)
Line Coverage 61.35% (391094/637524)
Region Coverage 57.50% (328614/571499)
Branch Coverage 58.32% (149835/256906)

@HappenLee

Copy link
Copy Markdown
Contributor

[P1] Preserve the probe-side IDENTITY layout through broadcast joins

At commit e920dbd3f53c39152b0a9434a1ced47538db38a4, the new PlanNode.getStorageDistributionHashType() returns null whenever its children report different hash types. HashJoinNode inherits this implementation, but a broadcast join preserves the probe side's storage layout; the build side's hash label should not determine that layout.

A reduced plan illustrating the issue is:

Bucket-shuffle join on a.id = c.id
  LocalExchange BUCKET_HASH_SHUFFLE
    Broadcast hash join on a.id = b.id
      Scan a: IDENTITY
      Broadcast Exchange for b: default CRC32 label
  Bucket-shuffle Exchange for c: IDENTITY

The broadcast join reports null for the IDENTITY/CRC32 children. LocalExchangeNode then leaves its hash type at the default CRC32, although the probe data still follows the IDENTITY bucket layout.

I reproduced this with a focused FE unit test: construct a real broadcast HashJoinNode with mocked leaf nodes returning IDENTITY and CRC32, wrap it in a real LocalExchangeNode(BUCKET_HASH_SHUFFLE), and assert that the resulting hash type is IDENTITY. The test fails with:

expected: <IDENTITY> but was: <CRC32>

On a multi-BE layout, CRC32 recomputation can select buckets absent from the current BE's local bucket map. The local exchanger's row-count check then returns Rows mismatched! Data may be lost.... This runtime consequence follows from the code path; I have not reproduced it with an end-to-end multi-BE SQL test.

The BE-native local-exchange path also derives the fragment hash type from the plan root, so the same loss can leave its bucket partitioner at CRC32.

Please derive the hash type from the distribution actually preserved by each operator, with broadcast joins inheriting the probe side, and add a broadcast-join → bucket-join regression covering both FE-planned and BE-native local exchange.

@HappenLee

Copy link
Copy Markdown
Contributor

[P1] Normalize storage hash metadata when converting to EXECUTION_BUCKETED

ChildrenPropertiesRegulator.calAnotherSideRequired() unconditionally copies notNeedShuffleSideOutput.getHashType(), including when the requested shuffle type is EXECUTION_BUCKETED.

This can produce an EXECUTION_BUCKETED property labeled IDENTITY when an identity bucket join is downgraded to an ordinary shuffle, for example with enable_bucket_shuffle_join=false: the downgrade branches pass the original storage spec into this helper.

However, PhysicalPlanTranslator translates EXECUTION_BUCKETED into ordinary HASH_PARTITIONED, and the BE exchange sink uses CRC32C or CRC32 according to the query option. It does not use the table's IDENTITY algorithm for this exchange.

A reduced problematic property combination is:

Inner hash join on x.id = y.id
  Subplan X: EXECUTION_BUCKETED, retained IDENTITY label
  Subplan Y: EXECUTION_BUCKETED, CRC32 label

Both sides physically use the same execution shuffle algorithm. The regulator's both-EXECUTION_BUCKETED branch checks key order, but the new DistributionSpecHash.merge() assertion rejects the different retained storage labels.

I reproduced the failure in a focused FE unit test by constructing these two distribution specs, passing them to the real ChildOutputPropertyDeriver, and deriving the output of an inner hash join. It throws:

can not merge distribution specs with different hash types: IDENTITY vs CRC32

This is a property-derivation unit reproduction with directly constructed child properties and a mocked join type, not an end-to-end SQL reproduction. The producer of the inconsistent properties is the downgrade/helper path above.

Please normalize the storage hash metadata when transitioning to EXECUTION_BUCKETED, and define hash-type equality according to the relevant distribution kind. Merely removing the merge assertion would leave the metadata inconsistent with execution. A regression should combine an identity-origin execution-shuffled subplan with a CRC32-origin execution-shuffled subplan.

Broadcast joins do not repartition their probe input, so derive the output storage hash type from the probe child instead of combining it with the replicated build child. This keeps IDENTITY metadata intact for downstream FE-planned and BE-native bucket local exchanges, with focused unit and regression coverage for broadcast-join-to-bucket-join plans.
EXECUTION_BUCKETED is produced by the ordinary execution exchange and no longer follows a table's storage hash algorithm. Normalize its hash metadata to CRC32 at DistributionSpecHash construction so downgraded IDENTITY plans can merge with other execution-shuffled inputs without reporting a false storage-layout conflict.
…ash_type

# Conflicts:
#	be/src/agent/be_exec_version_manager.cpp
#	be/src/agent/be_exec_version_manager.h
#	be/test/exec/sink/tablet_sink_hash_partitioner_test.cpp
#	fe/fe-common/src/main/java/org/apache/doris/common/Config.java
The merged master branch rejects JUnit 3/4 APIs and already migrated overlapping tests to JUnit 5. Update the distribution hash tests and newly merged assertions to use JUnit 5 so FE test compilation and targeted tests pass.
@zghong

zghong commented Sep 11, 2026

Copy link
Copy Markdown
Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

Cloud UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.56% (2060/2656)
Line Coverage 65.89% (37738/57275)
Region Coverage 53.00% (35110/66245)
Branch Coverage 56.59% (11314/19994)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17572	3067	3045	3045
q2	2087	256	224	224
q3	10247	901	512	512
q4	4677	257	206	206
q5	7667	566	403	403
q6	140	115	95	95
q7	528	525	395	395
q8	9237	886	915	886
q9	3485	2421	2410	2410
q10	6512	852	763	763
q11	392	200	189	189
q12	611	257	198	198
q13	18167	1578	1182	1182
q14	159	146	143	143
q15	q16	454	402	373	373
q17	1402	861	805	805
q18	3153	2327	2309	2309
q19	1140	847	725	725
q20	372	282	199	199
q21	5268	1685	1886	1685
q22	330	272	231	231
Total cold run time: 93600 ms
Total hot run time: 16978 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3419	3354	3351	3351
q2	503	397	382	382
q3	2320	2332	2222	2222
q4	1210	1178	905	905
q5	2243	2166	2153	2153
q6	176	120	88	88
q7	1042	953	886	886
q8	1606	1391	1403	1391
q9	3202	3162	3156	3156
q10	1909	1846	1664	1664
q11	360	272	254	254
q12	459	434	346	346
q13	1519	1542	1191	1191
q14	173	176	175	175
q15	q16	396	412	364	364
q17	3640	3513	3260	3260
q18	4907	4561	4880	4561
q19	961	847	874	847
q20	1017	982	818	818
q21	3904	3209	3195	3195
q22	403	356	336	336
Total cold run time: 35369 ms
Total hot run time: 31545 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 84138 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 8774b5d426d4477a5f2d822201ec9509218af858, data reload: false

query5	4275	415	359	359
query6	386	134	126	126
query7	4970	451	249	249
query8	287	133	124	124
query9	8692	2918	2943	2918
query10	407	227	209	209
query11	5379	1072	924	924
query12	134	74	74	74
query13	1195	457	336	336
query14	6139	2261	2165	2165
query14_1	2037	2016	2042	2016
query15	174	120	119	119
query16	913	393	352	352
query17	796	469	374	374
query18	2345	335	242	242
query19	171	140	115	115
query20	84	75	73	73
query21	203	107	91	91
query22	5583	5618	5499	5499
query23	6959	6419	6354	6354
query23_1	6167	6395	6334	6334
query24	7235	1116	782	782
query24_1	781	798	776	776
query25	429	299	263	263
query26	1236	252	135	135
query27	2759	422	261	261
query28	4680	1505	1521	1505
query29	933	441	356	356
query30	255	155	134	134
query31	838	407	338	338
query32	129	76	78	76
query33	458	234	192	192
query34	990	849	478	478
query35	418	411	350	350
query36	598	592	540	540
query37	124	86	83	83
query38	1028	876	818	818
query39	505	486	488	486
query39_1	458	486	483	483
query40	210	93	79	79
query41	61	57	57	57
query42	77	76	75	75
query43	242	249	216	216
query44	990	547	549	547
query45	116	108	113	108
query46	832	866	532	532
query47	774	810	736	736
query48	333	311	234	234
query49	531	252	191	191
query50	751	268	196	196
query51	8162	8278	8188	8188
query52	71	88	99	88
query53	196	202	148	148
query54	210	167	140	140
query55	76	59	65	59
query56	194	155	176	155
query57	678	690	662	662
query58	196	168	172	168
query59	1235	1265	1109	1109
query60	248	178	191	178
query61	108	111	124	111
query62	377	204	171	171
query63	175	136	139	136
query64	2659	729	606	606
query65	1719	1684	1659	1659
query66	1769	265	212	212
query67	10504	10171	9891	9891
query68	3036	1205	764	764
query69	348	230	200	200
query70	673	670	642	642
query71	260	183	166	166
query72	2319	1695	1545	1545
query73	660	613	334	334
query74	2014	1240	1185	1185
query75	1210	1113	1000	1000
query76	2398	729	528	528
query77	261	262	220	220
query78	4024	3830	3313	3313
query79	2297	832	599	599
query80	1613	345	278	278
query81	489	162	136	136
query82	602	124	99	99
query83	277	211	191	191
query84	296	108	90	90
query85	772	355	282	282
query86	383	179	164	164
query87	1031	1012	913	913
query88	2765	2106	2110	2106
query89	280	198	186	186
query90	1991	129	136	129
query91	131	117	97	97
query92	81	74	68	68
query93	1419	1096	710	710
query94	635	245	230	230
query95	519	333	226	226
query96	823	626	282	282
query97	1086	1109	1058	1058
query98	164	140	132	132
query99	426	357	316	316
Total cold run time: 179339 ms
Total hot run time: 84138 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 14.9 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8774b5d426d4477a5f2d822201ec9509218af858, data reload: false

query1	0.01	0.00	0.00
query2	0.07	0.04	0.04
query3	0.25	0.11	0.11
query4	1.60	0.11	0.10
query5	0.17	0.17	0.16
query6	1.26	0.70	0.70
query7	0.04	0.01	0.01
query8	0.05	0.04	0.03
query9	0.29	0.22	0.23
query10	0.37	0.35	0.37
query11	0.16	0.12	0.12
query12	0.16	0.12	0.12
query13	0.32	0.32	0.31
query14	0.46	0.46	0.47
query15	0.37	0.37	0.37
query16	0.22	0.22	0.23
query17	0.70	0.76	0.70
query18	0.19	0.16	0.15
query19	1.22	1.19	1.21
query20	0.02	0.01	0.01
query21	15.45	0.15	0.13
query22	5.08	0.05	0.04
query23	16.19	0.25	0.10
query24	3.02	0.33	0.24
query25	0.10	0.04	0.03
query26	0.76	0.16	0.13
query27	0.04	0.03	0.02
query28	3.66	0.56	0.27
query29	12.41	3.20	2.57
query30	0.26	0.12	0.12
query31	2.76	0.38	0.17
query32	3.51	0.33	0.24
query33	1.39	1.41	1.54
query34	15.36	2.24	1.82
query35	1.78	1.81	1.76
query36	0.45	0.29	0.27
query37	0.06	0.04	0.04
query38	0.05	0.03	0.02
query39	0.04	0.03	0.02
query40	0.11	0.07	0.07
query41	0.08	0.03	0.02
query42	0.03	0.02	0.03
query43	0.03	0.03	0.02
Total cold run time: 90.55 s
Total hot run time: 14.9 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 91.87% (113/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 63.27% (29633/46838)
Line Coverage 48.18% (309624/642622)
Region Coverage 43.71% (249243/570214)
Branch Coverage 45.33% (116118/256169)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 97.56% (120/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.37% (34652/45371)
Line Coverage 61.33% (389665/635341)
Region Coverage 57.57% (327000/568016)
Branch Coverage 58.38% (149110/255433)

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 97.56% (120/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.37% (34652/45371)
Line Coverage 61.33% (389650/635341)
Region Coverage 57.57% (326987/568016)
Branch Coverage 58.37% (149094/255433)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17588	3077	3066	3066
q2	2058	263	281	263
q3	10218	875	517	517
q4	4706	265	207	207
q5	7824	578	404	404
q6	166	114	95	95
q7	596	512	414	414
q8	10343	925	912	912
q9	4460	2437	2423	2423
q10	6563	928	718	718
q11	401	197	183	183
q12	675	263	203	203
q13	18246	1558	1184	1184
q14	167	154	138	138
q15	q16	451	404	371	371
q17	1391	854	793	793
q18	3094	2298	2267	2267
q19	1124	939	767	767
q20	370	283	205	205
q21	5444	1669	1872	1669
q22	324	274	245	245
Total cold run time: 96209 ms
Total hot run time: 17044 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	3417	3363	3363	3363
q2	502	395	384	384
q3	2253	2347	2188	2188
q4	1211	1170	916	916
q5	2205	2158	2173	2158
q6	166	123	88	88
q7	1065	922	853	853
q8	1602	1406	1419	1406
q9	3217	3137	3155	3137
q10	1902	1839	1723	1723
q11	360	273	258	258
q12	454	433	349	349
q13	1462	1532	1151	1151
q14	164	186	174	174
q15	q16	408	411	361	361
q17	3686	3426	3258	3258
q18	4952	4591	5115	4591
q19	948	874	874	874
q20	1023	966	850	850
q21	3874	3215	3216	3215
q22	407	356	330	330
Total cold run time: 35278 ms
Total hot run time: 31627 ms

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 97.56% (120/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.38% (34654/45371)
Line Coverage 61.35% (389783/635341)
Region Coverage 57.58% (327068/568016)
Branch Coverage 58.38% (149122/255433)

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 83049 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 8774b5d426d4477a5f2d822201ec9509218af858, data reload: false

query5	4274	430	347	347
query6	385	142	128	128
query7	4902	397	226	226
query8	292	128	118	118
query9	8691	2903	2902	2902
query10	408	229	205	205
query11	5377	1037	926	926
query12	130	75	71	71
query13	1210	472	314	314
query14	6151	2238	2145	2145
query14_1	2027	1991	1979	1979
query15	176	125	116	116
query16	920	377	363	363
query17	1057	481	364	364
query18	2358	332	240	240
query19	166	139	115	115
query20	92	82	70	70
query21	203	106	89	89
query22	5395	5428	5351	5351
query23	6980	6279	6213	6213
query23_1	6199	6256	6097	6097
query24	7279	1127	787	787
query24_1	788	792	765	765
query25	432	302	267	267
query26	1251	237	131	131
query27	2779	438	256	256
query28	4711	1514	1513	1513
query29	931	439	370	370
query30	250	156	132	132
query31	820	413	333	333
query32	133	73	79	73
query33	466	235	183	183
query34	1026	815	483	483
query35	409	418	357	357
query36	565	588	519	519
query37	125	80	77	77
query38	1017	857	828	828
query39	519	494	468	468
query39_1	479	484	471	471
query40	207	94	81	81
query41	61	57	56	56
query42	75	73	73	73
query43	242	245	219	219
query44	998	537	550	537
query45	113	108	104	104
query46	796	844	525	525
query47	778	804	729	729
query48	321	302	218	218
query49	539	246	186	186
query50	784	256	202	202
query51	8237	8174	8085	8085
query52	71	65	60	60
query53	193	235	184	184
query54	202	178	152	152
query55	74	65	54	54
query56	211	157	176	157
query57	713	681	646	646
query58	194	166	161	161
query59	1231	1248	1125	1125
query60	264	188	164	164
query61	118	125	130	125
query62	344	214	174	174
query63	169	140	139	139
query64	2733	729	619	619
query65	1700	1669	1636	1636
query66	1803	266	204	204
query67	10186	10201	9816	9816
query68	2782	1206	758	758
query69	330	226	205	205
query70	672	624	582	582
query71	245	178	171	171
query72	2332	1707	1519	1519
query73	655	616	338	338
query74	1567	1246	1142	1142
query75	1194	1109	985	985
query76	2288	722	517	517
query77	248	252	225	225
query78	3928	3820	3316	3316
query79	2903	827	579	579
query80	1609	335	268	268
query81	504	164	137	137
query82	620	134	97	97
query83	265	212	191	191
query84	250	110	88	88
query85	822	352	296	296
query86	468	175	164	164
query87	1023	976	907	907
query88	3122	2121	2122	2121
query89	276	203	177	177
query90	2234	133	126	126
query91	131	121	98	98
query92	98	75	72	72
query93	2454	1185	699	699
query94	654	264	214	214
query95	524	249	303	249
query96	769	558	294	294
query97	1083	1036	1017	1017
query98	175	144	134	134
query99	422	351	310	310
Total cold run time: 180818 ms
Total hot run time: 83049 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 14.81 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 8774b5d426d4477a5f2d822201ec9509218af858, data reload: false

query1	0.00	0.01	0.00
query2	0.07	0.03	0.03
query3	0.26	0.10	0.09
query4	1.60	0.09	0.09
query5	0.17	0.15	0.16
query6	1.29	0.68	0.69
query7	0.03	0.01	0.00
query8	0.04	0.03	0.03
query9	0.28	0.22	0.24
query10	0.36	0.35	0.36
query11	0.17	0.12	0.12
query12	0.15	0.12	0.12
query13	0.30	0.30	0.32
query14	0.46	0.46	0.45
query15	0.36	0.36	0.35
query16	0.24	0.23	0.21
query17	0.68	0.73	0.68
query18	0.18	0.17	0.17
query19	1.24	1.19	1.24
query20	0.01	0.01	0.01
query21	15.46	0.16	0.12
query22	5.05	0.05	0.04
query23	16.22	0.26	0.10
query24	2.96	0.31	0.24
query25	0.11	0.04	0.04
query26	0.83	0.16	0.11
query27	0.03	0.02	0.04
query28	3.66	0.57	0.26
query29	12.46	3.21	2.57
query30	0.26	0.11	0.12
query31	2.75	0.39	0.17
query32	3.51	0.34	0.23
query33	1.42	1.41	1.44
query34	15.41	2.24	1.85
query35	1.84	1.80	1.78
query36	0.46	0.29	0.28
query37	0.06	0.04	0.04
query38	0.04	0.04	0.03
query39	0.03	0.02	0.02
query40	0.12	0.08	0.09
query41	0.08	0.03	0.02
query42	0.03	0.02	0.03
query43	0.03	0.03	0.03
Total cold run time: 90.71 s
Total hot run time: 14.81 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 97.56% (120/123) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 76.38% (34655/45371)
Line Coverage 61.36% (389820/635341)
Region Coverage 57.59% (327111/568016)
Branch Coverage 58.39% (149138/255433)

@zghong

zghong commented Sep 15, 2026

Copy link
Copy Markdown
Author

run buildall

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.

[Bug] Data skew in Hash Bucketing with CRC32

3 participants