Skip to content

[Test](bitmap) Harden BitmapValue serialization test#65491

Open
linrrzqqq wants to merge 1 commit into
apache:masterfrom
linrrzqqq:bitmap-ser-test
Open

[Test](bitmap) Harden BitmapValue serialization test#65491
linrrzqqq wants to merge 1 commit into
apache:masterfrom
linrrzqqq:bitmap-ser-test

Conversation

@linrrzqqq

Copy link
Copy Markdown
Collaborator

Release note

  • Strengthen BitmapValue serialization tests for deterministic and non-deterministic formats.

  • Keep exact byte assertions for non-SET bitmap encodings.

  • Add fixed historical SET binary inputs and verify deserialized bitmap contents semantically.

  • Avoid pinning bitmap_to_base64 output for SET because hash-set iteration order makes serialized bytes unstable.

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

@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

/review

@linrrzqqq

Copy link
Copy Markdown
Collaborator Author

run buildall

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

Automated review completed for PR #65491.

I did not find a substantiated blocking issue to raise as an inline comment. The PR is test-only and is focused on making bitmap serialization coverage deterministic where SET payload ordering depends on hash-set iteration, while keeping exact byte checks for deterministic encodings and adding historical SET decode cases.

Critical checkpoint conclusions:

  • Goal and coverage: The changed tests exercise BitmapValue serialization for v1/v2 bitmap encodings, semantic SET round trips, historical SET payload order, SQL bitmap_from_base64 semantics, and doc-suite round-trip behavior. The current code accomplishes the stated test-hardening goal.
  • Scope: The PR is small and limited to bitmap serialization tests and expected output files.
  • Concurrency, lifecycle, persistence, data writes, and FE/BE protocol: No production code paths are changed, so these checkpoints are not materially affected.
  • Configuration/session behavior: The new BitmapValue serde test saves and restores both bitmap config values it mutates. Existing function tests still use config::set_config as before; the new assertions do not introduce a distinct leak.
  • Parallel paths: Unit coverage and regression coverage both exercise bitmap_to_base64/bitmap_from_base64 round trips; fixed historical bytes cover from_base64 decode semantics independently from nondeterministic SET serialization order.
  • Expected results: The added regression outputs match fixed decode inputs. bitmap_to_string sorts SET contents before printing, so the new outputs are deterministic.
  • Performance and observability: Not applicable for this test-only change.

Subagent conclusions:

  • optimizer-rewrite: NO_NEW_VALUABLE_FINDINGS in the initial pass and final convergence round.
  • tests-session-config: NO_NEW_VALUABLE_FINDINGS in the initial pass and final convergence round.
  • No subagent candidates were accepted, dismissed as duplicates, or converted into inline comments.

User focus points: No additional user-provided review focus was supplied.

Validation performed: reviewed the GitHub PR file list and patch, inspected related BitmapValue and bitmap function code paths, verified no existing inline review comments, and ran a scoped git diff --check over the five GitHub-reported PR files. I did not run BE unit tests or regression tests because this checkout is missing .worktree_initialized, thirdparty/installed, and thirdparty/installed/bin/protoc; the review is therefore static plus lightweight diff validation.

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.78% (30188/40368)
Line Coverage 58.77% (331403/563878)
Region Coverage 55.57% (278219/500634)
Branch Coverage 56.82% (122935/216359)

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17744	4115	4164	4115
q2	2011	319	202	202
q3	10359	1444	792	792
q4	4682	469	335	335
q5	7490	848	588	588
q6	184	174	138	138
q7	770	833	632	632
q8	9363	1445	1521	1445
q9	5601	4383	4350	4350
q10	6760	1775	1519	1519
q11	515	337	312	312
q12	725	542	435	435
q13	18054	3370	2727	2727
q14	263	256	256	256
q15	q16	782	789	709	709
q17	1023	926	928	926
q18	6896	5723	5495	5495
q19	1306	1284	980	980
q20	717	683	557	557
q21	6065	2687	2453	2453
q22	448	355	295	295
Total cold run time: 101758 ms
Total hot run time: 29261 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4349	4275	4290	4275
q2	293	313	213	213
q3	4596	4911	4395	4395
q4	2053	2153	1357	1357
q5	4426	4322	4316	4316
q6	226	175	127	127
q7	1747	1611	2058	1611
q8	2558	2137	2179	2137
q9	8082	8132	7817	7817
q10	4756	4773	4231	4231
q11	574	420	373	373
q12	764	784	561	561
q13	3261	3565	2954	2954
q14	324	319	280	280
q15	q16	701	738	681	681
q17	1386	1306	1303	1303
q18	8293	7264	7202	7202
q19	1132	1099	1091	1091
q20	2208	2189	1937	1937
q21	5235	4508	4338	4338
q22	529	446	392	392
Total cold run time: 57493 ms
Total hot run time: 51591 ms

@hello-stephen

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

query5	4332	630	510	510
query6	463	222	204	204
query7	4843	611	333	333
query8	334	187	168	168
query9	8763	4013	4012	4012
query10	451	353	297	297
query11	5934	2325	2147	2147
query12	155	111	99	99
query13	1295	603	450	450
query14	6290	5268	4999	4999
query14_1	4282	4269	4293	4269
query15	208	205	185	185
query16	995	472	430	430
query17	937	711	582	582
query18	2462	474	349	349
query19	211	199	151	151
query20	115	114	107	107
query21	234	158	133	133
query22	13620	13596	13333	13333
query23	17464	16585	16034	16034
query23_1	16323	16338	16356	16338
query24	7506	1772	1306	1306
query24_1	1320	1309	1306	1306
query25	575	455	394	394
query26	1331	359	213	213
query27	2591	597	379	379
query28	4493	2044	2009	2009
query29	1097	636	528	528
query30	333	261	228	228
query31	1117	1097	993	993
query32	113	62	61	61
query33	519	323	256	256
query34	1173	1078	668	668
query35	770	783	682	682
query36	1395	1399	1219	1219
query37	155	109	92	92
query38	1873	1689	1670	1670
query39	961	922	897	897
query39_1	885	913	885	885
query40	242	159	137	137
query41	65	64	62	62
query42	89	91	94	91
query43	312	323	284	284
query44	1392	780	756	756
query45	197	184	181	181
query46	1095	1258	705	705
query47	2370	2364	2183	2183
query48	412	434	305	305
query49	576	420	314	314
query50	1049	434	330	330
query51	10675	10593	10759	10593
query52	85	86	73	73
query53	276	276	203	203
query54	270	235	212	212
query55	75	70	66	66
query56	308	289	259	259
query57	1420	1385	1309	1309
query58	288	254	249	249
query59	1541	1656	1446	1446
query60	290	262	242	242
query61	156	145	152	145
query62	722	649	579	579
query63	244	202	205	202
query64	2786	1030	863	863
query65	4878	4774	4768	4768
query66	1812	512	388	388
query67	29526	29441	29329	29329
query68	3197	1607	1030	1030
query69	418	288	258	258
query70	1069	947	989	947
query71	388	319	323	319
query72	2997	2698	2371	2371
query73	836	749	459	459
query74	5122	4959	4748	4748
query75	2604	2597	2226	2226
query76	2316	1202	801	801
query77	358	375	287	287
query78	12225	12421	11720	11720
query79	1399	1201	785	785
query80	640	550	458	458
query81	475	325	286	286
query82	572	156	124	124
query83	402	316	285	285
query84	329	160	133	133
query85	944	601	507	507
query86	356	295	290	290
query87	1819	1833	1757	1757
query88	3676	2808	2808	2808
query89	466	415	366	366
query90	1888	203	190	190
query91	195	190	157	157
query92	63	60	57	57
query93	1603	1558	1067	1067
query94	542	372	313	313
query95	770	569	488	488
query96	1123	773	318	318
query97	2682	2672	2553	2553
query98	213	212	201	201
query99	1143	1175	1017	1017
Total cold run time: 264155 ms
Total hot run time: 180287 ms

@hello-stephen

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

query1	0.01	0.01	0.01
query2	0.09	0.05	0.04
query3	0.26	0.13	0.12
query4	1.61	0.14	0.14
query5	0.23	0.25	0.21
query6	1.22	1.12	1.06
query7	0.03	0.01	0.00
query8	0.05	0.04	0.04
query9	0.37	0.31	0.33
query10	0.57	0.55	0.55
query11	0.19	0.15	0.14
query12	0.19	0.14	0.14
query13	0.48	0.48	0.47
query14	1.02	1.02	1.02
query15	0.63	0.60	0.60
query16	0.31	0.34	0.32
query17	1.10	1.10	1.08
query18	0.23	0.20	0.20
query19	2.03	1.98	1.95
query20	0.02	0.01	0.01
query21	15.51	0.23	0.14
query22	4.79	0.06	0.05
query23	16.16	0.30	0.12
query24	3.08	0.44	0.30
query25	0.11	0.04	0.05
query26	0.72	0.22	0.16
query27	0.04	0.04	0.04
query28	3.64	0.92	0.53
query29	12.57	4.06	3.19
query30	0.27	0.15	0.16
query31	2.77	0.60	0.31
query32	3.21	0.59	0.48
query33	3.29	3.35	3.20
query34	15.65	4.28	3.52
query35	3.51	3.53	3.52
query36	0.55	0.44	0.42
query37	0.09	0.06	0.06
query38	0.05	0.05	0.04
query39	0.04	0.03	0.03
query40	0.18	0.17	0.16
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 97.04 s
Total hot run time: 24.96 s

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.

2 participants