Skip to content

Conversation

@feiniaofeiafei
Copy link
Contributor

@feiniaofeiafei feiniaofeiafei commented Apr 8, 2025

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #32743

Problem Summary:
problem before this pr:

  1. null type problem
    the type of NULL is null_type, this will lead to error when select this view through jdbc catalog.
mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.02 sec)

mysql> desc test_null;
+-------+-----------+------+-------+---------+-------+
| Field | Type      | Null | Key   | Default | Extra |
+-------+-----------+------+-------+---------+-------+
| col1  | null_type | Yes  | false | NULL    |       |
+-------+-----------+------+-------+---------+-------+
1 row in set (0.00 sec)

after this pr, the type is changed to tinyint.
mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS col1;
Query OK, 0 rows affected (0.03 sec)

mysql> desc test_null2;
+-------+---------+------+-------+---------+-------+
| Field | Type    | Null | Key   | Default | Extra |
+-------+---------+------+-------+---------+-------+
| col1  | tinyint | Yes  | false | NULL    |       |
+-------+---------+------+-------+---------+-------+
1 row in set (0.01 sec)
  1. nullable problem
    Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation

Release note

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

@hello-stephen
Copy link
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?

@feiniaofeiafei feiniaofeiafei marked this pull request as draft April 8, 2025 11:47
@feiniaofeiafei feiniaofeiafei force-pushed the fix_create_view_nulltype branch from 09fd48b to e04340b Compare April 10, 2025 05:56
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@feiniaofeiafei
Copy link
Contributor Author

run performance

@feiniaofeiafei feiniaofeiafei marked this pull request as ready for review April 10, 2025 08:46
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26124	4974	5049	4974
q2	2063	272	200	200
q3	10381	1256	723	723
q4	10244	988	535	535
q5	7513	2370	2318	2318
q6	193	163	132	132
q7	917	748	640	640
q8	9338	1283	1106	1106
q9	6824	5151	5178	5151
q10	6823	2303	1907	1907
q11	483	292	283	283
q12	349	363	214	214
q13	17768	3687	3088	3088
q14	233	222	200	200
q15	527	479	475	475
q16	619	636	561	561
q17	616	848	395	395
q18	7474	7181	7129	7129
q19	1214	935	590	590
q20	351	341	228	228
q21	4369	3452	3210	3210
q22	1051	998	974	974
Total cold run time: 115474 ms
Total hot run time: 35033 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5116	5093	5150	5093
q2	231	325	227	227
q3	2190	2633	2283	2283
q4	1405	1831	1493	1493
q5	4490	4413	4407	4407
q6	226	177	135	135
q7	2009	1920	1806	1806
q8	2726	2595	2576	2576
q9	7350	7253	7375	7253
q10	3006	3219	2755	2755
q11	585	510	496	496
q12	673	781	664	664
q13	3517	3879	3416	3416
q14	283	299	280	280
q15	527	467	460	460
q16	653	688	635	635
q17	1158	1513	1424	1424
q18	7717	7521	7397	7397
q19	825	776	863	776
q20	1917	2006	1854	1854
q21	5315	5024	4710	4710
q22	1125	1068	1016	1016
Total cold run time: 53044 ms
Total hot run time: 51156 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193450 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 e04340b702cae6ec400c1ade5ebfa073213c6bd1, data reload: false

query1	1405	1068	1026	1026
query2	6133	1970	1950	1950
query3	11001	4602	4400	4400
query4	53960	25348	23600	23600
query5	5185	585	448	448
query6	345	208	205	205
query7	4862	517	282	282
query8	335	240	223	223
query9	5395	2554	2561	2554
query10	417	327	256	256
query11	15081	15174	14753	14753
query12	170	111	106	106
query13	1035	507	412	412
query14	10216	6332	6373	6332
query15	211	195	188	188
query16	7080	722	498	498
query17	1097	753	603	603
query18	1548	425	330	330
query19	207	218	181	181
query20	136	126	122	122
query21	215	123	111	111
query22	4482	4662	4301	4301
query23	34302	33467	33584	33467
query24	6722	2434	2438	2434
query25	450	472	401	401
query26	685	287	152	152
query27	2277	523	328	328
query28	3204	2441	2426	2426
query29	588	559	455	455
query30	275	226	193	193
query31	899	936	816	816
query32	78	67	65	65
query33	495	368	306	306
query34	786	892	526	526
query35	806	834	780	780
query36	944	1024	923	923
query37	121	103	80	80
query38	4164	4182	4221	4182
query39	1626	1500	1484	1484
query40	234	124	110	110
query41	55	55	52	52
query42	126	114	107	107
query43	524	535	508	508
query44	1336	830	848	830
query45	179	177	164	164
query46	835	1039	642	642
query47	1856	1892	1812	1812
query48	387	418	335	335
query49	683	500	408	408
query50	659	692	396	396
query51	4256	4344	4223	4223
query52	111	107	97	97
query53	223	262	186	186
query54	572	568	519	519
query55	90	88	78	78
query56	315	297	301	297
query57	1161	1186	1138	1138
query58	274	270	252	252
query59	2733	2866	2801	2801
query60	332	339	325	325
query61	137	147	131	131
query62	726	779	697	697
query63	230	189	186	186
query64	1741	1040	693	693
query65	4317	4326	4261	4261
query66	789	401	318	318
query67	15924	15799	15358	15358
query68	7074	890	519	519
query69	540	299	263	263
query70	1255	1141	1092	1092
query71	501	318	294	294
query72	5610	4733	4702	4702
query73	1461	608	354	354
query74	9344	9101	8673	8673
query75	4079	3219	2704	2704
query76	4273	1201	766	766
query77	702	382	283	283
query78	10061	10098	9395	9395
query79	2351	810	558	558
query80	618	504	431	431
query81	478	256	221	221
query82	434	126	98	98
query83	339	257	245	245
query84	298	103	85	85
query85	779	352	309	309
query86	364	318	296	296
query87	4533	4576	4408	4408
query88	3380	2185	2191	2185
query89	412	311	282	282
query90	1957	207	205	205
query91	138	136	110	110
query92	78	59	128	59
query93	1411	943	585	585
query94	684	405	309	309
query95	365	300	288	288
query96	488	579	267	267
query97	3143	3348	3166	3166
query98	220	210	207	207
query99	1478	1368	1268	1268
Total cold run time: 298591 ms
Total hot run time: 193450 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.04
query2	0.13	0.10	0.10
query3	0.25	0.20	0.20
query4	1.59	0.20	0.20
query5	0.61	0.58	0.59
query6	1.23	0.70	0.72
query7	0.02	0.02	0.02
query8	0.03	0.03	0.04
query9	0.59	0.51	0.52
query10	0.57	0.60	0.56
query11	0.15	0.12	0.11
query12	0.16	0.11	0.12
query13	0.62	0.61	0.61
query14	2.67	2.85	2.70
query15	0.94	0.85	0.86
query16	0.38	0.38	0.39
query17	1.05	1.04	1.01
query18	0.21	0.20	0.20
query19	1.93	2.01	1.80
query20	0.02	0.01	0.01
query21	15.36	0.90	0.54
query22	0.76	1.13	0.67
query23	15.29	1.41	0.61
query24	7.25	1.20	1.42
query25	0.53	0.18	0.12
query26	0.69	0.16	0.15
query27	0.06	0.05	0.05
query28	9.61	0.88	0.44
query29	12.60	3.98	3.27
query30	0.24	0.08	0.06
query31	2.82	0.60	0.39
query32	3.25	0.54	0.46
query33	3.12	3.07	3.01
query34	15.71	5.11	4.43
query35	4.47	4.55	4.54
query36	0.69	0.50	0.48
query37	0.09	0.06	0.07
query38	0.05	0.04	0.03
query39	0.03	0.02	0.03
query40	0.17	0.14	0.14
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 106.12 s
Total hot run time: 31.45 s

924060929
924060929 previously approved these changes Apr 14, 2025
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Apr 14, 2025
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Apr 15, 2025
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	25859	5054	5010	5010
q2	2070	287	182	182
q3	10392	1226	686	686
q4	10241	973	528	528
q5	7531	2340	2294	2294
q6	185	163	134	134
q7	913	733	607	607
q8	9319	1287	1087	1087
q9	6775	5112	5087	5087
q10	6835	2308	1904	1904
q11	477	291	272	272
q12	363	347	215	215
q13	17770	3748	3095	3095
q14	232	237	217	217
q15	539	499	478	478
q16	635	606	576	576
q17	577	839	350	350
q18	7498	7155	7170	7155
q19	1761	956	554	554
q20	329	336	216	216
q21	3892	3359	2444	2444
q22	1075	979	962	962
Total cold run time: 115268 ms
Total hot run time: 34053 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5198	5100	5197	5100
q2	236	334	236	236
q3	2218	2701	2310	2310
q4	1443	1871	1470	1470
q5	4517	4492	4368	4368
q6	216	166	128	128
q7	1986	1915	1774	1774
q8	2605	2547	2506	2506
q9	7206	7183	7029	7029
q10	2958	3151	2755	2755
q11	574	523	502	502
q12	716	762	628	628
q13	3434	3856	3310	3310
q14	276	307	298	298
q15	549	505	494	494
q16	656	692	654	654
q17	1153	1532	1377	1377
q18	7694	7636	7464	7464
q19	801	808	837	808
q20	1933	1990	1858	1858
q21	5304	5111	4869	4869
q22	1076	1066	1044	1044
Total cold run time: 52749 ms
Total hot run time: 50982 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 194315 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 e04493970445e517606e121777518da7510c7376, data reload: false

query1	1435	1084	1074	1074
query2	6244	1918	1882	1882
query3	11014	4554	4468	4468
query4	51945	25441	23468	23468
query5	5071	572	483	483
query6	333	219	193	193
query7	4873	505	283	283
query8	314	263	243	243
query9	5498	2614	2611	2611
query10	428	333	269	269
query11	15162	15151	14936	14936
query12	166	114	107	107
query13	1035	533	391	391
query14	10259	6682	6672	6672
query15	207	222	179	179
query16	7094	657	495	495
query17	1115	753	617	617
query18	1550	420	311	311
query19	197	188	172	172
query20	132	127	122	122
query21	210	124	109	109
query22	4412	4551	4303	4303
query23	34377	33590	33611	33590
query24	6510	2441	2479	2441
query25	447	475	401	401
query26	712	290	161	161
query27	2292	535	343	343
query28	2892	2422	2448	2422
query29	579	571	438	438
query30	285	222	199	199
query31	857	866	782	782
query32	78	63	62	62
query33	460	373	311	311
query34	777	874	523	523
query35	831	850	807	807
query36	986	1001	901	901
query37	125	102	80	80
query38	4290	4237	4281	4237
query39	1511	1459	1493	1459
query40	219	122	107	107
query41	55	53	50	50
query42	127	108	106	106
query43	489	503	484	484
query44	1372	835	820	820
query45	186	179	173	173
query46	879	1048	672	672
query47	1844	1859	1777	1777
query48	396	423	319	319
query49	680	512	428	428
query50	683	720	427	427
query51	4300	4280	4406	4280
query52	110	106	105	105
query53	228	285	195	195
query54	595	576	522	522
query55	85	84	94	84
query56	301	324	309	309
query57	1153	1164	1127	1127
query58	263	275	257	257
query59	2719	2786	2776	2776
query60	350	342	314	314
query61	130	126	122	122
query62	763	728	675	675
query63	241	198	190	190
query64	1532	1054	712	712
query65	4479	4268	4250	4250
query66	764	410	322	322
query67	15827	15396	15281	15281
query68	6948	897	520	520
query69	602	306	271	271
query70	1208	1128	1129	1128
query71	507	330	288	288
query72	5754	4761	4789	4761
query73	1421	620	345	345
query74	8854	9141	9005	9005
query75	3793	3193	2709	2709
query76	4158	1199	779	779
query77	626	370	282	282
query78	10082	10063	9285	9285
query79	2318	820	570	570
query80	575	517	430	430
query81	476	268	223	223
query82	453	125	100	100
query83	358	252	229	229
query84	293	110	86	86
query85	785	352	335	335
query86	380	304	288	288
query87	4490	4435	4371	4371
query88	3445	2227	2249	2227
query89	393	317	285	285
query90	1849	217	222	217
query91	139	143	108	108
query92	77	60	54	54
query93	1764	954	567	567
query94	670	418	273	273
query95	372	317	281	281
query96	489	578	280	280
query97	3264	3230	3112	3112
query98	237	209	206	206
query99	1441	1400	1271	1271
Total cold run time: 295694 ms
Total hot run time: 194315 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.02
query2	0.13	0.11	0.11
query3	0.25	0.19	0.19
query4	1.60	0.20	0.19
query5	0.61	0.58	0.58
query6	1.18	0.71	0.72
query7	0.02	0.01	0.01
query8	0.04	0.04	0.03
query9	0.57	0.54	0.51
query10	0.56	0.57	0.58
query11	0.15	0.10	0.10
query12	0.13	0.11	0.11
query13	0.61	0.59	0.60
query14	2.66	2.81	2.69
query15	0.92	0.84	0.84
query16	0.39	0.37	0.38
query17	0.99	1.05	1.04
query18	0.21	0.19	0.20
query19	1.86	1.88	1.88
query20	0.02	0.01	0.01
query21	15.36	0.97	0.57
query22	0.77	1.21	0.70
query23	14.92	1.39	0.64
query24	6.94	1.38	1.02
query25	0.54	0.37	0.07
query26	0.48	0.16	0.13
query27	0.05	0.05	0.04
query28	10.05	0.89	0.45
query29	12.53	3.92	3.25
query30	0.25	0.08	0.06
query31	2.82	0.59	0.39
query32	3.23	0.54	0.47
query33	3.09	3.07	3.06
query34	15.68	5.12	4.47
query35	4.53	4.54	4.52
query36	0.70	0.51	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.03
query40	0.18	0.13	0.13
query41	0.08	0.03	0.03
query42	0.03	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 105.38 s
Total hot run time: 31.39 s

@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26012	5088	5026	5026
q2	2072	270	178	178
q3	10404	1228	698	698
q4	10229	998	538	538
q5	7529	2364	2335	2335
q6	179	161	132	132
q7	897	720	623	623
q8	9315	1285	1060	1060
q9	6891	5043	5086	5043
q10	6809	2314	1884	1884
q11	490	287	270	270
q12	350	349	219	219
q13	17780	3703	3102	3102
q14	232	231	215	215
q15	544	498	486	486
q16	445	453	406	406
q17	588	850	357	357
q18	7481	7099	7144	7099
q19	1212	938	550	550
q20	327	325	219	219
q21	3989	3402	2454	2454
q22	1033	1006	953	953
Total cold run time: 114808 ms
Total hot run time: 33847 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5124	5172	5148	5148
q2	235	328	240	240
q3	2135	2646	2269	2269
q4	1480	1816	1365	1365
q5	4431	4402	4498	4402
q6	212	167	130	130
q7	2000	1997	1814	1814
q8	2684	2734	2602	2602
q9	7416	7384	7048	7048
q10	3013	3159	2730	2730
q11	572	499	504	499
q12	669	762	631	631
q13	3500	3952	3338	3338
q14	279	301	287	287
q15	515	485	487	485
q16	483	525	458	458
q17	1132	1541	1415	1415
q18	7691	7650	7508	7508
q19	817	807	903	807
q20	2005	2007	1872	1872
q21	5145	4873	4740	4740
q22	1096	1080	1013	1013
Total cold run time: 52634 ms
Total hot run time: 50801 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192182 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 6e174d4adff88491e0c22b17893fd211649fb1b9, data reload: false

query1	1392	1123	1076	1076
query2	6021	1797	1782	1782
query3	11183	4548	4509	4509
query4	25565	23931	23206	23206
query5	4892	609	446	446
query6	287	213	223	213
query7	3983	497	285	285
query8	291	238	232	232
query9	8574	2550	2550	2550
query10	503	327	263	263
query11	15189	15017	14758	14758
query12	161	117	110	110
query13	1578	523	387	387
query14	9073	6075	6026	6026
query15	207	188	159	159
query16	7506	627	505	505
query17	1153	744	612	612
query18	2047	423	338	338
query19	199	224	185	185
query20	138	125	126	125
query21	209	128	111	111
query22	4513	4584	4349	4349
query23	34467	34141	33671	33671
query24	8534	2427	2461	2427
query25	564	504	419	419
query26	1177	270	151	151
query27	2989	518	339	339
query28	4713	2130	2122	2122
query29	705	563	436	436
query30	281	227	190	190
query31	905	858	791	791
query32	75	74	63	63
query33	517	396	314	314
query34	802	874	507	507
query35	822	847	787	787
query36	951	1009	904	904
query37	114	102	81	81
query38	4223	4216	4152	4152
query39	1468	1430	1437	1430
query40	222	127	104	104
query41	54	51	51	51
query42	126	111	111	111
query43	486	514	475	475
query44	1332	830	819	819
query45	178	172	164	164
query46	853	1023	666	666
query47	1914	1911	1809	1809
query48	367	412	311	311
query49	764	515	432	432
query50	681	699	395	395
query51	4298	4269	4225	4225
query52	103	104	94	94
query53	225	261	179	179
query54	578	615	520	520
query55	82	81	80	80
query56	308	317	280	280
query57	1208	1208	1100	1100
query58	267	256	263	256
query59	2730	2745	2664	2664
query60	333	338	309	309
query61	134	136	146	136
query62	775	761	704	704
query63	232	195	181	181
query64	4094	1064	706	706
query65	4445	4395	4360	4360
query66	1073	411	318	318
query67	16252	15763	15340	15340
query68	8741	880	507	507
query69	468	299	264	264
query70	1228	1092	1138	1092
query71	491	311	283	283
query72	5620	4696	4631	4631
query73	685	565	352	352
query74	9065	9074	8656	8656
query75	3922	3202	2704	2704
query76	3761	1202	774	774
query77	800	376	290	290
query78	10055	10292	9333	9333
query79	1984	879	567	567
query80	753	509	462	462
query81	475	254	229	229
query82	429	129	99	99
query83	284	245	227	227
query84	288	101	82	82
query85	782	433	311	311
query86	328	301	284	284
query87	4377	4345	4366	4345
query88	3145	2219	2207	2207
query89	412	310	272	272
query90	1927	210	202	202
query91	141	144	111	111
query92	76	56	59	56
query93	1309	931	571	571
query94	659	404	308	308
query95	379	289	287	287
query96	482	567	271	271
query97	3180	3279	3133	3133
query98	229	209	199	199
query99	1415	1399	1273	1273
Total cold run time: 279975 ms
Total hot run time: 192182 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.03
query2	0.12	0.11	0.12
query3	0.26	0.20	0.20
query4	1.59	0.19	0.10
query5	0.58	0.57	0.57
query6	1.19	0.72	0.72
query7	0.02	0.02	0.01
query8	0.05	0.03	0.03
query9	0.58	0.51	0.51
query10	0.58	0.57	0.56
query11	0.15	0.11	0.11
query12	0.15	0.12	0.11
query13	0.61	0.60	0.60
query14	1.15	1.16	1.16
query15	0.88	0.85	0.86
query16	0.39	0.38	0.39
query17	1.04	1.04	1.01
query18	0.21	0.19	0.19
query19	1.86	1.85	1.84
query20	0.01	0.01	0.01
query21	15.38	0.92	0.55
query22	0.76	1.10	0.61
query23	15.09	1.39	0.63
query24	7.68	1.35	0.42
query25	0.44	0.21	0.17
query26	0.59	0.18	0.13
query27	0.05	0.04	0.05
query28	9.11	0.85	0.43
query29	12.56	4.01	3.33
query30	0.24	0.09	0.07
query31	2.83	0.59	0.38
query32	3.22	0.54	0.47
query33	3.01	3.10	3.02
query34	15.79	5.16	4.50
query35	4.56	4.52	4.52
query36	0.67	0.49	0.49
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.02	0.02	0.02
query40	0.17	0.15	0.13
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 103.92 s
Total hot run time: 29.17 s

@feiniaofeiafei feiniaofeiafei force-pushed the fix_create_view_nulltype branch from 6e174d4 to aa5f827 Compare May 14, 2025 10:33
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	27089	5086	5021	5021
q2	2077	281	182	182
q3	10404	1270	689	689
q4	10240	1010	540	540
q5	7538	2177	2341	2177
q6	197	166	131	131
q7	890	756	619	619
q8	9314	1246	1103	1103
q9	6815	5118	5161	5118
q10	6829	2329	1893	1893
q11	500	293	277	277
q12	347	368	220	220
q13	17753	3741	3113	3113
q14	239	234	214	214
q15	533	496	474	474
q16	443	431	378	378
q17	579	874	367	367
q18	7764	7222	7205	7205
q19	1216	966	583	583
q20	348	352	218	218
q21	3930	3442	2431	2431
q22	1046	1019	943	943
Total cold run time: 116091 ms
Total hot run time: 33896 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5080	5066	5079	5066
q2	250	326	232	232
q3	2193	2703	2306	2306
q4	1367	1793	1430	1430
q5	4590	4435	4379	4379
q6	219	181	125	125
q7	1962	1877	1745	1745
q8	2626	2583	2497	2497
q9	7202	7083	7111	7083
q10	3054	3213	2743	2743
q11	582	516	494	494
q12	702	784	593	593
q13	3493	3992	3239	3239
q14	287	297	280	280
q15	521	481	468	468
q16	438	482	467	467
q17	1155	1590	1415	1415
q18	7790	7545	7410	7410
q19	806	877	859	859
q20	2012	2076	1873	1873
q21	5221	4734	4624	4624
q22	1063	1039	1029	1029
Total cold run time: 52613 ms
Total hot run time: 50357 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 187244 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 aa5f827a2172dc9cac64c6b7b8714b3a6399be72, data reload: false

query1	1013	489	499	489
query2	6557	1796	1805	1796
query3	6770	223	219	219
query4	26497	23318	23107	23107
query5	4308	628	495	495
query6	303	201	194	194
query7	4636	491	304	304
query8	302	258	239	239
query9	8616	2688	2701	2688
query10	471	329	262	262
query11	15798	15459	15078	15078
query12	155	106	105	105
query13	1642	546	411	411
query14	9550	6150	6120	6120
query15	209	198	179	179
query16	7200	645	455	455
query17	1209	738	598	598
query18	1982	413	310	310
query19	195	191	162	162
query20	119	122	131	122
query21	222	132	108	108
query22	4103	4275	4006	4006
query23	34111	33216	33121	33121
query24	8310	2400	2408	2400
query25	563	469	420	420
query26	1244	277	163	163
query27	2685	495	338	338
query28	4355	2143	2167	2143
query29	782	557	434	434
query30	284	219	187	187
query31	946	818	751	751
query32	72	63	64	63
query33	578	362	312	312
query34	809	845	529	529
query35	768	841	762	762
query36	942	982	870	870
query37	121	103	78	78
query38	4096	4194	4038	4038
query39	1482	1415	1392	1392
query40	213	133	109	109
query41	58	55	53	53
query42	142	109	110	109
query43	496	501	482	482
query44	1317	820	826	820
query45	180	170	169	169
query46	850	1028	647	647
query47	1766	1783	1720	1720
query48	401	424	327	327
query49	799	544	428	428
query50	659	683	405	405
query51	4171	4152	4156	4152
query52	110	103	99	99
query53	220	253	184	184
query54	602	579	532	532
query55	85	84	85	84
query56	305	315	298	298
query57	1131	1149	1099	1099
query58	271	260	266	260
query59	2583	2637	2723	2637
query60	347	326	323	323
query61	128	125	174	125
query62	797	709	667	667
query63	237	185	188	185
query64	4432	1013	674	674
query65	4418	4228	4283	4228
query66	1127	407	316	316
query67	16004	15634	15535	15535
query68	8393	914	539	539
query69	465	314	264	264
query70	1205	1128	1111	1111
query71	466	337	313	313
query72	5730	4755	4795	4755
query73	719	638	352	352
query74	8910	9137	8917	8917
query75	3858	3248	2738	2738
query76	3630	1200	789	789
query77	786	395	308	308
query78	10114	10207	9386	9386
query79	3565	799	564	564
query80	671	533	456	456
query81	472	257	224	224
query82	523	134	99	99
query83	284	251	244	244
query84	296	113	85	85
query85	827	456	320	320
query86	336	330	288	288
query87	4405	4419	4387	4387
query88	3238	2299	2288	2288
query89	451	335	288	288
query90	1950	211	208	208
query91	147	140	117	117
query92	75	63	60	60
query93	2748	964	578	578
query94	669	393	295	295
query95	380	292	286	286
query96	504	579	286	286
query97	3179	3207	3105	3105
query98	238	210	217	210
query99	1457	1399	1269	1269
Total cold run time: 278545 ms
Total hot run time: 187244 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.12	0.11	0.11
query3	0.26	0.19	0.20
query4	1.60	0.20	0.10
query5	0.57	0.53	0.56
query6	1.19	0.73	0.72
query7	0.03	0.02	0.02
query8	0.04	0.04	0.03
query9	0.59	0.52	0.51
query10	0.57	0.58	0.58
query11	0.16	0.11	0.11
query12	0.15	0.11	0.12
query13	0.62	0.60	0.60
query14	0.79	0.81	0.81
query15	0.90	0.85	0.85
query16	0.40	0.39	0.40
query17	1.03	1.05	1.07
query18	0.23	0.22	0.22
query19	1.89	1.86	1.78
query20	0.01	0.01	0.01
query21	15.44	0.96	0.56
query22	0.77	1.31	0.63
query23	14.89	1.40	0.63
query24	7.11	1.16	0.86
query25	0.52	0.20	0.08
query26	0.62	0.16	0.13
query27	0.05	0.05	0.04
query28	9.52	0.93	0.47
query29	12.70	4.04	3.34
query30	0.25	0.09	0.07
query31	2.82	0.60	0.39
query32	3.23	0.55	0.48
query33	3.06	3.12	3.10
query34	15.71	5.10	4.54
query35	4.49	4.56	4.49
query36	0.66	0.50	0.48
query37	0.09	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.17	0.14	0.13
query41	0.08	0.03	0.02
query42	0.04	0.03	0.02
query43	0.04	0.03	0.04
Total cold run time: 103.53 s
Total hot run time: 29.36 s

@feiniaofeiafei feiniaofeiafei force-pushed the fix_create_view_nulltype branch from 174e92c to f406a93 Compare May 16, 2025 03:26
@feiniaofeiafei
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	26968	5026	5080	5026
q2	2111	289	183	183
q3	10393	1214	728	728
q4	10212	980	516	516
q5	7539	2352	2277	2277
q6	184	165	132	132
q7	910	723	617	617
q8	9328	1195	1065	1065
q9	6789	5072	5111	5072
q10	6874	2326	1884	1884
q11	494	302	286	286
q12	353	352	211	211
q13	17800	3680	3074	3074
q14	228	221	211	211
q15	523	478	492	478
q16	422	432	375	375
q17	629	868	389	389
q18	7668	7242	7214	7214
q19	1560	962	577	577
q20	323	340	224	224
q21	3735	3161	2384	2384
q22	1041	1017	944	944
Total cold run time: 116084 ms
Total hot run time: 33867 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5182	5072	5072	5072
q2	235	321	231	231
q3	2189	2649	2260	2260
q4	1349	1720	1369	1369
q5	4427	4364	4413	4364
q6	232	166	125	125
q7	2041	2096	1789	1789
q8	2584	2577	2522	2522
q9	7279	7273	7074	7074
q10	3019	3177	2747	2747
q11	585	514	494	494
q12	698	770	644	644
q13	3485	3862	3281	3281
q14	320	288	266	266
q15	525	472	474	472
q16	435	491	476	476
q17	1160	1566	1358	1358
q18	7701	7623	7421	7421
q19	825	841	1027	841
q20	1990	1979	1865	1865
q21	4932	4535	4461	4461
q22	1051	1022	993	993
Total cold run time: 52244 ms
Total hot run time: 50125 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192742 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 f406a93c51d99564a59aac9a54802e2d2b47998b, data reload: false

query1	1388	1104	1066	1066
query2	6246	1895	1937	1895
query3	11001	4729	4492	4492
query4	25735	23500	23115	23115
query5	4069	633	484	484
query6	307	207	218	207
query7	3993	500	307	307
query8	293	243	266	243
query9	8469	2655	2680	2655
query10	447	330	275	275
query11	15797	15117	14784	14784
query12	168	111	110	110
query13	1714	523	389	389
query14	10183	6045	6050	6045
query15	198	194	169	169
query16	7578	612	470	470
query17	1364	753	579	579
query18	2002	408	340	340
query19	205	204	175	175
query20	136	128	119	119
query21	205	127	120	120
query22	4443	4555	4258	4258
query23	34679	33849	33367	33367
query24	8487	2454	2407	2407
query25	526	480	415	415
query26	1182	280	161	161
query27	2806	524	359	359
query28	4592	2173	2155	2155
query29	679	574	453	453
query30	271	218	203	203
query31	924	871	790	790
query32	78	61	64	61
query33	544	373	317	317
query34	826	883	558	558
query35	829	872	795	795
query36	992	996	917	917
query37	125	106	82	82
query38	4255	4302	4190	4190
query39	1599	1454	1472	1454
query40	224	134	127	127
query41	65	58	58	58
query42	131	112	117	112
query43	562	516	498	498
query44	1347	844	839	839
query45	183	178	169	169
query46	852	1053	663	663
query47	1835	1882	1821	1821
query48	401	434	356	356
query49	785	545	434	434
query50	662	719	415	415
query51	4287	4278	4187	4187
query52	109	110	107	107
query53	241	263	194	194
query54	584	588	517	517
query55	93	89	89	89
query56	322	352	307	307
query57	1203	1214	1148	1148
query58	272	281	259	259
query59	2874	2876	2828	2828
query60	324	326	341	326
query61	128	118	124	118
query62	779	709	692	692
query63	237	187	194	187
query64	4256	1053	735	735
query65	4464	4344	4403	4344
query66	1044	432	317	317
query67	16027	15445	15542	15445
query68	8433	886	517	517
query69	470	302	268	268
query70	1164	1096	1140	1096
query71	449	331	306	306
query72	5570	4780	4882	4780
query73	663	631	357	357
query74	8978	8862	9109	8862
query75	3677	3206	2700	2700
query76	3470	1220	762	762
query77	763	379	286	286
query78	10059	9955	9312	9312
query79	2580	813	600	600
query80	643	506	461	461
query81	489	272	273	272
query82	468	128	95	95
query83	257	252	238	238
query84	260	120	85	85
query85	776	347	309	309
query86	369	325	293	293
query87	4370	4510	4352	4352
query88	3707	2328	2310	2310
query89	406	321	288	288
query90	1882	209	212	209
query91	136	143	110	110
query92	78	63	55	55
query93	2457	928	569	569
query94	681	396	305	305
query95	376	303	282	282
query96	510	586	289	289
query97	2720	2777	2620	2620
query98	246	209	198	198
query99	1387	1420	1283	1283
Total cold run time: 282120 ms
Total hot run time: 192742 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.12	0.10	0.12
query3	0.25	0.20	0.19
query4	1.60	0.19	0.20
query5	0.44	0.44	0.45
query6	1.17	0.67	0.67
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.61	0.52	0.52
query10	0.58	0.58	0.57
query11	0.16	0.10	0.11
query12	0.16	0.12	0.12
query13	0.61	0.59	0.60
query14	0.79	0.82	0.81
query15	0.87	0.87	0.88
query16	0.39	0.38	0.38
query17	1.06	1.05	1.05
query18	0.23	0.22	0.21
query19	1.91	1.82	1.84
query20	0.02	0.01	0.01
query21	15.69	0.91	0.53
query22	0.76	1.23	0.73
query23	14.84	1.34	0.65
query24	7.39	1.38	0.35
query25	0.51	0.13	0.07
query26	0.61	0.18	0.13
query27	0.05	0.05	0.05
query28	9.35	0.89	0.45
query29	12.55	3.91	3.24
query30	0.24	0.10	0.08
query31	2.81	0.60	0.38
query32	3.22	0.56	0.47
query33	3.02	3.08	3.10
query34	15.80	5.08	4.48
query35	4.50	4.54	4.46
query36	0.66	0.50	0.48
query37	0.09	0.06	0.06
query38	0.06	0.04	0.03
query39	0.03	0.03	0.03
query40	0.18	0.13	0.13
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.04	0.03
Total cold run time: 103.59 s
Total hot run time: 28.67 s

@feiniaofeiafei
Copy link
Contributor Author

run cloud_p0

@feiniaofeiafei
Copy link
Contributor Author

run external

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label May 16, 2025
@github-actions
Copy link
Contributor

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

@zy-kkk zy-kkk merged commit 3a154a2 into apache:master May 19, 2025
25 of 26 checks passed
@zy-kkk zy-kkk added usercase Important user case type label dev/2.1.x dev/3.0.x labels May 19, 2025
github-actions bot pushed a commit that referenced this pull request May 19, 2025
Related PR: #32743

Problem Summary:
problem before this pr:
1. null type problem
the type of NULL is null_type, this will lead to error when select this view through jdbc catalog.
```sql
mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.02 sec)

mysql> desc test_null;
+-------+-----------+------+-------+---------+-------+
| Field | Type      | Null | Key   | Default | Extra |
+-------+-----------+------+-------+---------+-------+
| col1  | null_type | Yes  | false | NULL    |       |
+-------+-----------+------+-------+---------+-------+
1 row in set (0.00 sec)
```
after this pr, the type is changed to tinyint.
mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.03 sec)
```sql
mysql> desc test_null2;
+-------+---------+------+-------+---------+-------+
| Field | Type    | Null | Key   | Default | Extra |
+-------+---------+------+-------+---------+-------+
| col1  | tinyint | Yes  | false | NULL    |       |
+-------+---------+------+-------+---------+-------+
1 row in set (0.01 sec)
```
2. nullable problem
Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation
### Release note
github-actions bot pushed a commit that referenced this pull request May 19, 2025
Related PR: #32743

Problem Summary:
problem before this pr:
1. null type problem
the type of NULL is null_type, this will lead to error when select this view through jdbc catalog.
```sql
mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.02 sec)

mysql> desc test_null;
+-------+-----------+------+-------+---------+-------+
| Field | Type      | Null | Key   | Default | Extra |
+-------+-----------+------+-------+---------+-------+
| col1  | null_type | Yes  | false | NULL    |       |
+-------+-----------+------+-------+---------+-------+
1 row in set (0.00 sec)
```
after this pr, the type is changed to tinyint.
mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.03 sec)
```sql
mysql> desc test_null2;
+-------+---------+------+-------+---------+-------+
| Field | Type    | Null | Key   | Default | Extra |
+-------+---------+------+-------+---------+-------+
| col1  | tinyint | Yes  | false | NULL    |       |
+-------+---------+------+-------+---------+-------+
1 row in set (0.01 sec)
```
2. nullable problem
Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation
### Release note
yiguolei pushed a commit that referenced this pull request May 19, 2025
…51006)

Cherry-picked from #49881

Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
dataroaring pushed a commit that referenced this pull request May 24, 2025
…51005)

Cherry-picked from #49881

Co-authored-by: feiniaofeiafei <moailing@selectdb.com>
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
Related PR: apache#32743

Problem Summary:
problem before this pr:
1. null type problem
the type of NULL is null_type, this will lead to error when select this view through jdbc catalog.
```sql
mysql> CREATE VIEW test_null COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.02 sec)

mysql> desc test_null;
+-------+-----------+------+-------+---------+-------+
| Field | Type      | Null | Key   | Default | Extra |
+-------+-----------+------+-------+---------+-------+
| col1  | null_type | Yes  | false | NULL    |       |
+-------+-----------+------+-------+---------+-------+
1 row in set (0.00 sec)
```
after this pr, the type is changed to tinyint.
mysql> CREATE VIEW test_null2 COMMENT '测试null类型' AS SELECT NULL AS `col1`;
Query OK, 0 rows affected (0.03 sec)
```sql
mysql> desc test_null2;
+-------+---------+------+-------+---------+-------+
| Field | Type    | Null | Key   | Default | Extra |
+-------+---------+------+-------+---------+-------+
| col1  | tinyint | Yes  | false | NULL    |       |
+-------+---------+------+-------+---------+-------+
1 row in set (0.01 sec)
```
2. nullable problem
Modify the internal elements of nested types returned by JDBC to always be null, in order to maintain consistency with Doris' internal implementation
### Release note
@gavinchou gavinchou mentioned this pull request Jun 11, 2025
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/2.1.11-merged dev/3.0.6-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants