Skip to content

[test](geo) drop redundant assert_cast on already-typed null_map column#63701

Closed
airborne12 wants to merge 1 commit into
apache:masterfrom
airborne12:fix-geo-test-assert-cast
Closed

[test](geo) drop redundant assert_cast on already-typed null_map column#63701
airborne12 wants to merge 1 commit into
apache:masterfrom
airborne12:fix-geo-test-assert-cast

Conversation

@airborne12
Copy link
Copy Markdown
Member

Proposed changes

Issue Number: close #N/A

What problem does this PR solve?

BE-UT has been failing master-wide since both #63491 (strongly typed ColumnNullable::get_null_map_column[_ptr]() to `ColumnUInt8`) and #63049 (added `functions_geo_test.cpp`) landed today. The new test calls:

```cpp
assert_cast<ColumnUInt8*>(nullable_input->get_null_map_column_ptr().get())
->insert_value(0);
```

The inner expression is now already `ColumnUInt8*`, so the cast hits the same-type static_assert added by #63133 in `src/core/assert_cast.h`:

```
static assertion failed due to requirement
'!std::is_same_v<doris::ColumnVectordoris::TYPE_BOOLEAN *,
doris::ColumnVectordoris::TYPE_BOOLEAN *>':
assert_cast is redundant for the same type after removing cv/ref qualifiers
```

That kills `doris_be_test` compilation on every PR that exercises BE-UT (e.g. #63692 953796, ##63637 953796).

Use the strongly typed `get_null_map_column()` (which returns `ColumnUInt8&`) directly so no cast is needed.

Release note

None (test-only change, restores BE-UT compilation on master).

Check List (For Author)

  • Test: Local ASAN ninja build of the affected translation unit (`test/CMakeFiles/doris_be_test.dir/exprs/function/geo/functions_geo_test.cpp.o`) is clean after this change.
  • Behavior changed: No
  • 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?

@airborne12
Copy link
Copy Markdown
Member Author

run buildall

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-H: Total hot run time: 31574 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 3da727fc36642614fbd39e6de153f4f7742edcc6, 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	17709	4062	4011	4011
q2	q3	10827	1383	787	787
q4	4691	480	343	343
q5	7541	2265	2098	2098
q6	250	176	135	135
q7	930	771	643	643
q8	9376	1642	1554	1554
q9	5136	5007	4937	4937
q10	6382	2162	1861	1861
q11	438	273	245	245
q12	626	420	302	302
q13	18114	3343	2780	2780
q14	266	257	245	245
q15	q16	796	770	712	712
q17	934	851	917	851
q18	6875	5929	5660	5660
q19	1168	1347	1116	1116
q20	518	528	324	324
q21	5820	2825	2660	2660
q22	462	378	310	310
Total cold run time: 98859 ms
Total hot run time: 31574 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	5165	4831	4813	4813
q2	q3	4873	5315	4618	4618
q4	2123	2222	1428	1428
q5	4789	4861	4708	4708
q6	229	173	125	125
q7	1848	1807	1549	1549
q8	2468	2135	2113	2113
q9	7847	7879	7475	7475
q10	4761	4687	4208	4208
q11	538	390	362	362
q12	731	742	545	545
q13	2987	3424	2776	2776
q14	266	285	262	262
q15	q16	685	704	615	615
q17	1313	1286	1267	1267
q18	7196	6664	6744	6664
q19	1125	1082	1090	1082
q20	2212	2218	1971	1971
q21	5303	4715	4546	4546
q22	525	478	420	420
Total cold run time: 56984 ms
Total hot run time: 51547 ms

@hello-stephen
Copy link
Copy Markdown
Contributor

TPC-DS: Total hot run time: 172164 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 3da727fc36642614fbd39e6de153f4f7742edcc6, data reload: false

query5	4320	649	514	514
query6	321	217	199	199
query7	4231	563	328	328
query8	327	242	215	215
query9	8828	4046	4041	4041
query10	445	338	287	287
query11	5838	2408	2198	2198
query12	181	125	120	120
query13	1264	569	413	413
query14	6123	5485	5210	5210
query14_1	4507	4528	4502	4502
query15	208	206	183	183
query16	990	449	410	410
query17	935	705	597	597
query18	2443	478	364	364
query19	226	207	170	170
query20	134	132	132	132
query21	245	142	118	118
query22	13625	13580	13390	13390
query23	17293	16586	16077	16077
query23_1	16379	16321	16348	16321
query24	7683	1780	1315	1315
query24_1	1319	1304	1316	1304
query25	619	507	451	451
query26	1339	321	175	175
query27	2700	574	364	364
query28	4531	2001	2009	2001
query29	1021	623	517	517
query30	302	237	202	202
query31	1124	1084	962	962
query32	88	76	77	76
query33	546	369	308	308
query34	1191	1134	677	677
query35	768	804	728	728
query36	1388	1445	1235	1235
query37	158	105	90	90
query38	3211	3186	3088	3088
query39	932	913	919	913
query39_1	911	887	870	870
query40	228	154	128	128
query41	70	68	81	68
query42	111	110	108	108
query43	327	330	297	297
query44	
query45	219	208	205	205
query46	1087	1190	763	763
query47	2371	2341	2275	2275
query48	418	435	297	297
query49	657	509	387	387
query50	1036	352	257	257
query51	4356	4308	4249	4249
query52	107	108	94	94
query53	263	287	209	209
query54	327	282	271	271
query55	95	92	86	86
query56	304	325	320	320
query57	1464	1405	1315	1315
query58	307	282	274	274
query59	1673	1628	1447	1447
query60	315	324	314	314
query61	160	155	156	155
query62	697	649	593	593
query63	234	196	201	196
query64	2424	794	644	644
query65	
query66	1719	484	358	358
query67	29765	29689	29696	29689
query68	
query69	470	343	317	317
query70	982	1017	1004	1004
query71	305	274	261	261
query72	2989	2787	2395	2395
query73	859	753	431	431
query74	5159	4939	4800	4800
query75	2675	2598	2269	2269
query76	2303	1169	756	756
query77	403	408	320	320
query78	12445	12355	11802	11802
query79	1436	1120	743	743
query80	649	547	459	459
query81	451	275	243	243
query82	1393	166	123	123
query83	350	270	293	270
query84	308	146	108	108
query85	897	556	458	458
query86	391	361	334	334
query87	3433	3380	3223	3223
query88	3575	2705	2699	2699
query89	452	396	338	338
query90	2016	185	180	180
query91	180	170	140	140
query92	78	80	71	71
query93	1465	1479	923	923
query94	557	358	327	327
query95	695	381	361	361
query96	1044	772	336	336
query97	2699	2708	2618	2618
query98	237	225	227	225
query99	1168	1138	1031	1031
Total cold run time: 254607 ms
Total hot run time: 172164 ms

@airborne12
Copy link
Copy Markdown
Member Author

BeUt 953876 finished SUCCESS — the missing change (commit 3da727fc366) restores BE-UT compilation on master after the interaction between #63491 (strongly typed null_map accessor) and #63049 (new geo test). Without this fix, every PR running BE-UT fails the same way (see #63692 953796/953904). Please consider expediting.

@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 72.01% (27383/38028)
Line Coverage 55.31% (291961/527849)
Region Coverage 52.24% (242716/464619)
Branch Coverage 53.61% (104711/195337)

### What problem does this PR solve?

Issue Number: close #N/A

Problem Summary:

BE-UT has been failing master-wide since both PR apache#63491 (which strongly
typed `ColumnNullable::get_null_map_column[_ptr]()` to `ColumnUInt8`) and
PR apache#63049 (which added `functions_geo_test.cpp`) landed today. The new
test calls

```cpp
assert_cast<ColumnUInt8*>(nullable_input->get_null_map_column_ptr().get())
        ->insert_value(0);
```

but the inner expression is already `ColumnUInt8*`, so the cast triggers
the same-type static_assert added by PR apache#63133 to `src/core/assert_cast.h`:

```
static assertion failed due to requirement
'!std::is_same_v<doris::ColumnVector<doris::TYPE_BOOLEAN> *,
                 doris::ColumnVector<doris::TYPE_BOOLEAN> *>':
    assert_cast is redundant for the same type after removing cv/ref qualifiers
```

That kills `doris_be_test` compilation on every PR that runs BE-UT.

Use the strongly typed `get_null_map_column()` (which returns
`ColumnUInt8&`) directly so the cast is no longer needed.

### Release note

None (test-only change, restores BE-UT compilation on master).

### Check List (For Author)

- Test:
    - Compile-check on local ASAN tree: the affected translation unit
      now builds clean (`ninja test/CMakeFiles/doris_be_test.dir/exprs/function/geo/functions_geo_test.cpp.o`).
- Behavior changed: No
- Does this need documentation: No
@airborne12 airborne12 force-pushed the fix-geo-test-assert-cast branch from 3da727f to 52c346d Compare May 27, 2026 01:36
@airborne12 airborne12 closed this May 27, 2026
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