Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix](analysis) Fix ColumnDef to sql result #41205 #41323

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

w41ter
Copy link
Contributor

@w41ter w41ter commented Sep 26, 2024

cherry pick from #41205

For sql:

ALTER TABLE table_3333338 ADD COLUMN col484 DATETIME(1) REPLACE_IF_NOT_NULL

the toSql result is:

ADD COLUMN `col484` datetimev2(1) REPLACE_IF_NOT_NULL NULL DEFAULT "null" COMMENT ""

the 'DEFAULT "null"' is not a valid expr for datetime. This PR corrects
the behavior of toSql of the NULL DEFAULT VALUE to `DEFAULT NULL`. Then
the new result is:

ADD COLUMN `col484` datetimev2(1) REPLACE_IF_NOT_NULL NULL DEFAULT NULL COMMENT ""
@w41ter
Copy link
Contributor Author

w41ter commented Sep 26, 2024

run buildall

@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@github-actions github-actions bot added the area/planner Issues or PRs related to the query planner label Sep 26, 2024
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	18239	4425	4324	4324
q2	2074	153	154	153
q3	10327	1872	1908	1872
q4	10354	1219	1314	1219
q5	8459	3825	3881	3825
q6	233	123	124	123
q7	2035	1604	1586	1586
q8	9311	2739	2704	2704
q9	10067	9815	9707	9707
q10	8635	3520	3520	3520
q11	422	239	239	239
q12	463	292	295	292
q13	18362	3969	4033	3969
q14	364	332	326	326
q15	503	464	455	455
q16	537	460	466	460
q17	1146	960	953	953
q18	7166	6886	6767	6767
q19	1689	1559	1490	1490
q20	500	317	320	317
q21	4420	4143	4034	4034
q22	493	396	403	396
Total cold run time: 115799 ms
Total hot run time: 48731 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4388	4279	4312	4279
q2	326	228	228	228
q3	4168	4165	4151	4151
q4	2737	2760	2732	2732
q5	7118	7081	7157	7081
q6	239	119	118	118
q7	3274	2836	2836	2836
q8	4360	4508	4467	4467
q9	13591	13518	13446	13446
q10	4259	4240	4213	4213
q11	789	686	697	686
q12	1025	860	860	860
q13	6905	3740	3732	3732
q14	447	421	423	421
q15	508	474	461	461
q16	649	592	591	591
q17	3844	3808	3800	3800
q18	8783	8790	8830	8790
q19	1708	1664	1676	1664
q20	2415	2134	2107	2107
q21	8372	8460	8452	8452
q22	992	922	948	922
Total cold run time: 80897 ms
Total hot run time: 76037 ms

@doris-robot
Copy link

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

query1	926	392	414	392
query2	6527	2256	1922	1922
query3	6922	207	210	207
query4	23178	21441	21465	21441
query5	19722	6481	6521	6481
query6	288	233	249	233
query7	4329	295	298	295
query8	262	260	243	243
query9	3066	2635	2556	2556
query10	465	319	315	315
query11	15376	14905	15044	14905
query12	128	78	73	73
query13	1024	438	440	438
query14	17569	13812	13077	13077
query15	385	228	229	228
query16	6485	281	256	256
query17	1946	947	907	907
query18	905	320	318	318
query19	209	148	141	141
query20	115	98	105	98
query21	189	92	92	92
query22	5092	5033	4986	4986
query23	34202	33531	33385	33385
query24	7869	6318	6377	6318
query25	504	438	412	412
query26	1268	163	161	161
query27	2391	294	286	286
query28	6136	2253	2214	2214
query29	2896	2833	2756	2756
query30	244	171	167	167
query31	939	728	753	728
query32	71	58	60	58
query33	450	245	268	245
query34	866	469	468	468
query35	1127	925	947	925
query36	1308	1213	1126	1126
query37	174	63	57	57
query38	3077	2933	2915	2915
query39	1381	1326	1326	1326
query40	309	91	97	91
query41	38	37	38	37
query42	87	84	75	75
query43	666	606	656	606
query44	1146	713	712	712
query45	253	233	232	232
query46	1228	947	945	945
query47	1864	2147	1786	1786
query48	495	421	410	410
query49	655	371	373	371
query50	858	649	621	621
query51	4750	4687	4687	4687
query52	98	86	92	86
query53	226	187	191	187
query54	2694	2445	2465	2445
query55	86	77	82	77
query56	243	212	201	201
query57	1459	1182	1300	1182
query58	213	213	202	202
query59	3468	3397	3292	3292
query60	221	217	189	189
query61	97	94	96	94
query62	838	438	514	438
query63	202	168	172	168
query64	3551	1602	1461	1461
query65	3619	3554	3598	3554
query66	768	400	388	388
query67	17530	16342	15023	15023
query68	9653	665	662	662
query69	513	294	271	271
query70	1557	1327	1336	1327
query71	415	315	320	315
query72	6853	4791	4793	4791
query73	762	336	326	326
query74	6353	5900	5836	5836
query75	5450	3639	3639	3639
query76	5402	1135	1196	1135
query77	920	250	251	250
query78	12687	11790	11700	11700
query79	8304	654	647	647
query80	1630	406	383	383
query81	493	234	247	234
query82	1638	96	97	96
query83	175	131	130	130
query84	259	72	69	69
query85	885	317	319	317
query86	343	301	295	295
query87	3196	3013	2983	2983
query88	4685	2296	2271	2271
query89	493	288	284	284
query90	1971	213	222	213
query91	159	138	144	138
query92	60	52	50	50
query93	6349	548	555	548
query94	713	210	213	210
query95	1970	1662	1935	1662
query96	642	326	320	320
query97	6429	6446	6312	6312
query98	215	215	213	213
query99	2975	885	964	885
Total cold run time: 321822 ms
Total hot run time: 211223 ms

@doris-robot
Copy link

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

query1	0.02	0.02	0.02
query2	0.07	0.02	0.02
query3	0.25	0.05	0.05
query4	1.80	0.07	0.07
query5	0.54	0.53	0.52
query6	1.24	0.61	0.62
query7	0.02	0.01	0.01
query8	0.04	0.03	0.02
query9	0.54	0.50	0.48
query10	0.53	0.52	0.53
query11	0.13	0.08	0.09
query12	0.11	0.08	0.09
query13	0.62	0.62	0.60
query14	0.78	0.78	0.81
query15	0.78	0.78	0.77
query16	0.37	0.37	0.37
query17	1.01	0.97	1.03
query18	0.21	0.27	0.24
query19	1.92	1.78	1.88
query20	0.02	0.01	0.01
query21	15.48	0.56	0.54
query22	1.95	2.34	1.49
query23	17.05	1.03	0.84
query24	5.47	0.95	1.25
query25	0.38	0.13	0.05
query26	0.56	0.17	0.15
query27	0.05	0.04	0.03
query28	7.64	0.74	0.74
query29	12.71	2.31	2.36
query30	0.54	0.53	0.55
query31	2.80	0.38	0.38
query32	3.39	0.50	0.50
query33	3.08	3.07	3.08
query34	15.26	4.78	4.78
query35	4.84	4.84	4.83
query36	1.07	1.01	1.02
query37	0.06	0.04	0.05
query38	0.04	0.02	0.02
query39	0.02	0.02	0.01
query40	0.15	0.13	0.14
query41	0.07	0.01	0.02
query42	0.02	0.02	0.02
query43	0.02	0.02	0.02
Total cold run time: 103.65 s
Total hot run time: 30.45 s

@doris-robot
Copy link

Load test result on machine: 'aliyun_ecs.c7a.8xlarge_32C64G'

Load test result on commit afe49ac549a2dd63d5f2a057233d0e43f7e3c9ef with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       22.2 seconds inserted 10000000 Rows, about 450K ops/s

@w41ter w41ter merged commit 0784a0d into apache:branch-2.0 Sep 26, 2024
22 of 24 checks passed
@w41ter w41ter deleted the pick_41205_to_origin_branch-2.0 branch September 26, 2024 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/planner Issues or PRs related to the query planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants