Skip to content

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #48288

…en input Const(Nullable) column (#48288)

### What problem does this PR solve?

error code 
```
        ColumnPtr nested_column = column;
        if (column) {
            nested_column = nested_column->convert_to_full_column_if_const();
            const auto* source_column = assert_cast<const ColumnNullable*>(nested_column.get());
            nested_column = source_column->get_nested_column_ptr();
```

If column is a const(nullable) column, 
execute: nested_column =
nested_column->convert_to_full_column_if_const();
nested_column points to a new nullable column. 
Execute: const auto* source_column = assert_cast<const
ColumnNullable*>(nested_column.get());
source_column, this raw pointer, points to the new nullable column (but
does not have ownership).
Execute: nested_column = source_column->get_nested_column_ptr(); 
nested_column points to the nested column of the new nullable column,
and the original nullable column is released.




### Release note

None

### Check List (For Author)

- Test <!-- At least one of them must be included. -->
    - [ ] Regression test
    - [x] 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 <!-- Add your reason?  -->

- Behavior changed:
    - [x] No.
    - [ ] Yes. <!-- Explain the behavior change -->

- Does this need documentation?
    - [x] No.
- [ ] Yes. <!-- Add document PR link here. eg:
apache/doris-website#1214 -->

### Check List (For Reviewer who merge this PR)

- [x] Confirm the release note
- [x] Confirm test cases
- [x] Confirm document
- [x] Add branch pick label <!-- Add branch pick label that this PR
should merge into -->
@github-actions github-actions bot requested a review from dataroaring as a code owner March 19, 2025 06:56
@Thearas
Copy link
Contributor

Thearas commented Mar 19, 2025

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?

@dataroaring dataroaring reopened this Mar 19, 2025
@Thearas
Copy link
Contributor

Thearas commented Mar 19, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17592	6726	6601	6601
q2	2064	176	178	176
q3	10638	1096	1144	1096
q4	10562	743	740	740
q5	7734	2780	2869	2780
q6	222	135	131	131
q7	972	626	618	618
q8	9378	1970	2064	1970
q9	6577	6398	6374	6374
q10	7030	2254	2288	2254
q11	458	260	258	258
q12	398	208	211	208
q13	17774	3015	2996	2996
q14	240	204	209	204
q15	496	461	452	452
q16	670	588	585	585
q17	969	547	513	513
q18	7319	6582	6740	6582
q19	1398	1155	1020	1020
q20	471	201	202	201
q21	3974	3240	3214	3214
q22	1086	972	968	968
Total cold run time: 108022 ms
Total hot run time: 39941 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6629	6540	6694	6540
q2	336	242	234	234
q3	2911	2767	2885	2767
q4	2035	1784	1772	1772
q5	5773	5784	5688	5688
q6	206	125	127	125
q7	2235	1818	1813	1813
q8	3377	3543	3492	3492
q9	8806	8850	8822	8822
q10	3570	3575	3516	3516
q11	595	494	507	494
q12	788	589	615	589
q13	8958	3270	3181	3181
q14	306	270	271	270
q15	516	467	475	467
q16	683	658	657	657
q17	1831	1642	1603	1603
q18	8129	7719	7692	7692
q19	1668	1530	1450	1450
q20	2110	1882	1885	1882
q21	5527	5438	5283	5283
q22	1095	1033	1034	1033
Total cold run time: 68084 ms
Total hot run time: 59370 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197616 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 8b54a4f6e280146e0f02ff52332ef1fd1e645a0c, data reload: false

query1	1311	938	938	938
query2	6208	2051	1990	1990
query3	10824	4302	4422	4302
query4	65025	29321	23500	23500
query5	5048	478	467	467
query6	404	189	192	189
query7	5560	316	318	316
query8	303	223	229	223
query9	8855	2682	2636	2636
query10	451	279	256	256
query11	17585	15507	15613	15507
query12	163	106	106	106
query13	1500	466	458	458
query14	9944	7926	6909	6909
query15	208	185	191	185
query16	7115	475	521	475
query17	1106	591	601	591
query18	1997	338	324	324
query19	219	169	167	167
query20	130	113	109	109
query21	212	107	106	106
query22	4838	4602	4540	4540
query23	34406	34074	33919	33919
query24	6130	2978	2941	2941
query25	559	430	426	426
query26	657	178	181	178
query27	2066	352	366	352
query28	4154	2491	2485	2485
query29	682	450	443	443
query30	246	172	160	160
query31	991	815	829	815
query32	71	55	58	55
query33	441	300	309	300
query34	910	521	524	521
query35	856	728	731	728
query36	1089	972	975	972
query37	123	70	74	70
query38	4039	4024	4005	4005
query39	1494	1470	1471	1470
query40	201	110	100	100
query41	50	49	50	49
query42	121	107	104	104
query43	529	481	498	481
query44	1193	826	847	826
query45	184	173	175	173
query46	1166	754	757	754
query47	2023	1974	2050	1974
query48	472	383	391	383
query49	731	402	403	402
query50	860	437	431	431
query51	7359	7181	7194	7181
query52	101	90	86	86
query53	255	183	179	179
query54	552	455	445	445
query55	79	83	79	79
query56	261	250	247	247
query57	1256	1126	1074	1074
query58	215	206	213	206
query59	3046	2942	2781	2781
query60	281	260	259	259
query61	108	105	127	105
query62	779	675	663	663
query63	222	195	193	193
query64	1343	682	632	632
query65	3244	3143	3172	3143
query66	692	302	307	302
query67	16051	15876	15507	15507
query68	4010	592	629	592
query69	443	291	269	269
query70	1186	1112	1119	1112
query71	370	260	250	250
query72	6356	4055	4070	4055
query73	767	356	357	356
query74	9307	9236	9122	9122
query75	3313	2706	2653	2653
query76	1913	1024	971	971
query77	494	268	271	268
query78	10525	9604	9690	9604
query79	2056	606	618	606
query80	1408	427	433	427
query81	539	238	233	233
query82	1250	89	85	85
query83	161	144	148	144
query84	280	80	84	80
query85	993	307	292	292
query86	392	301	263	263
query87	4450	4309	4294	4294
query88	3865	2418	2400	2400
query89	419	300	290	290
query90	1958	188	188	188
query91	185	143	148	143
query92	68	48	52	48
query93	3050	567	553	553
query94	880	275	293	275
query95	352	258	256	256
query96	625	289	278	278
query97	3280	3238	3142	3142
query98	209	226	196	196
query99	1641	1278	1280	1278
Total cold run time: 318039 ms
Total hot run time: 197616 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.06	0.03	0.03
query3	0.23	0.07	0.06
query4	1.63	0.10	0.10
query5	0.54	0.53	0.54
query6	1.15	0.73	0.73
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.56	0.50	0.48
query10	0.55	0.55	0.55
query11	0.15	0.11	0.11
query12	0.15	0.11	0.11
query13	0.60	0.59	0.59
query14	2.74	2.74	2.75
query15	0.89	0.83	0.83
query16	0.36	0.39	0.42
query17	1.06	1.04	1.07
query18	0.22	0.22	0.22
query19	1.88	1.83	2.06
query20	0.01	0.01	0.01
query21	15.37	0.61	0.58
query22	2.74	2.76	1.82
query23	17.00	0.91	0.87
query24	2.98	1.25	0.14
query25	0.12	0.11	0.13
query26	0.30	0.15	0.13
query27	0.04	0.06	0.04
query28	11.39	0.51	0.46
query29	12.58	3.21	3.19
query30	0.25	0.05	0.06
query31	2.85	0.39	0.38
query32	3.25	0.46	0.46
query33	3.00	3.04	3.06
query34	17.23	4.57	4.50
query35	4.50	4.52	4.50
query36	0.69	0.49	0.50
query37	0.08	0.06	0.06
query38	0.05	0.03	0.03
query39	0.03	0.02	0.02
query40	0.17	0.12	0.13
query41	0.08	0.02	0.02
query42	0.03	0.03	0.02
query43	0.03	0.03	0.02
Total cold run time: 107.63 s
Total hot run time: 31.47 s

Copy link
Contributor

@dataroaring dataroaring left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions
Copy link
Contributor Author

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Mar 20, 2025
@github-actions
Copy link
Contributor Author

PR approved by anyone and no changes requested.

@dataroaring dataroaring merged commit fd5fceb into branch-3.0 Mar 20, 2025
22 of 24 checks passed
@github-actions github-actions bot deleted the auto-pick-48288-branch-3.0 branch March 20, 2025 06:40
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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants