Skip to content

[fix](default value) change throw AnalysisException order#35760

Merged
dataroaring merged 2 commits intoapache:masterfrom
Dragonliu2018:dragonliu/change_validate_default_value_order
Jun 12, 2024
Merged

[fix](default value) change throw AnalysisException order#35760
dataroaring merged 2 commits intoapache:masterfrom
Dragonliu2018:dragonliu/change_validate_default_value_order

Conversation

@Dragonliu2018
Copy link
Contributor

Proposed changes

Issue Number: close #35758

when types other than DATE and DATEV2 use current_date as the default value during creating a table, throw an AnalysisException similar to the following:

ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Types other than DATE and DATEV2 cannot use current_date as the default value

but not this AnalysisException:

ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Invalid floating-point literal: CURRENT_DATE

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

@Dragonliu2018
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17599	4344	4292	4292
q2	2009	196	199	196
q3	10444	1208	1063	1063
q4	10185	811	843	811
q5	7555	2787	2734	2734
q6	231	136	141	136
q7	974	615	630	615
q8	9222	2134	2110	2110
q9	9640	6716	6735	6716
q10	9855	3910	3915	3910
q11	467	246	249	246
q12	462	253	232	232
q13	17471	3195	3242	3195
q14	250	210	215	210
q15	523	472	476	472
q16	488	421	392	392
q17	984	603	677	603
q18	8407	7785	7898	7785
q19	3553	1337	1294	1294
q20	649	323	324	323
q21	5212	4118	3222	3222
q22	394	321	326	321
Total cold run time: 116574 ms
Total hot run time: 40878 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4578	4463	4476	4463
q2	375	266	267	266
q3	3160	2898	3023	2898
q4	1930	1599	1600	1599
q5	5374	5498	5467	5467
q6	227	129	133	129
q7	2115	1834	1820	1820
q8	3247	3371	3371	3371
q9	8568	8563	8604	8563
q10	4141	3903	3862	3862
q11	604	483	495	483
q12	779	594	609	594
q13	16040	3151	3165	3151
q14	305	263	265	263
q15	507	496	483	483
q16	466	429	433	429
q17	1798	1465	1489	1465
q18	7985	7656	7304	7304
q19	1778	1544	1572	1544
q20	3023	1843	1790	1790
q21	4824	4750	4673	4673
q22	677	525	530	525
Total cold run time: 72501 ms
Total hot run time: 55142 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 172238 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 7764563e55394c393bbf2b1e339bc0bc72f6917b, data reload: false

query1	914	376	366	366
query2	6445	2523	2315	2315
query3	6635	206	207	206
query4	18641	17420	17421	17420
query5	4092	459	459	459
query6	245	156	151	151
query7	4586	307	306	306
query8	308	275	274	274
query9	8724	2427	2434	2427
query10	443	297	291	291
query11	10450	10003	9932	9932
query12	139	86	89	86
query13	1644	365	356	356
query14	9263	7913	6335	6335
query15	220	185	188	185
query16	7779	267	265	265
query17	1286	529	529	529
query18	1804	267	267	267
query19	196	147	152	147
query20	97	83	85	83
query21	226	128	133	128
query22	4357	3883	3789	3789
query23	33805	33084	33376	33084
query24	11210	2918	2771	2771
query25	606	357	368	357
query26	1157	159	157	157
query27	3012	324	324	324
query28	7513	2050	2042	2042
query29	864	613	597	597
query30	240	148	151	148
query31	990	755	730	730
query32	98	51	53	51
query33	758	299	293	293
query34	941	483	478	478
query35	723	614	621	614
query36	1080	916	905	905
query37	159	66	69	66
query38	2906	2795	2782	2782
query39	887	791	797	791
query40	211	120	122	120
query41	46	50	47	47
query42	117	95	98	95
query43	589	538	573	538
query44	1207	717	733	717
query45	203	169	170	169
query46	1073	717	727	717
query47	1876	1756	1799	1756
query48	378	302	307	302
query49	920	398	411	398
query50	779	382	395	382
query51	6819	6675	6652	6652
query52	113	91	98	91
query53	355	289	286	286
query54	904	456	468	456
query55	72	74	73	73
query56	282	254	261	254
query57	1120	1047	1014	1014
query58	242	243	255	243
query59	3401	3248	3085	3085
query60	292	274	274	274
query61	90	95	86	86
query62	614	451	436	436
query63	309	290	285	285
query64	8895	2192	1748	1748
query65	3197	3137	3140	3137
query66	929	322	331	322
query67	15370	14787	14712	14712
query68	5858	546	551	546
query69	632	471	388	388
query70	1121	1094	1019	1019
query71	462	299	294	294
query72	7489	5794	5724	5724
query73	774	329	329	329
query74	5987	5647	5545	5545
query75	3734	2645	2656	2645
query76	3238	916	925	916
query77	653	300	296	296
query78	10382	9886	9756	9756
query79	2556	515	517	515
query80	2458	487	486	486
query81	557	223	224	223
query82	1197	120	107	107
query83	297	176	179	176
query84	274	94	92	92
query85	1402	315	310	310
query86	450	296	309	296
query87	3348	3160	3086	3086
query88	3936	2446	2426	2426
query89	472	391	399	391
query90	1874	195	195	195
query91	138	108	106	106
query92	63	54	50	50
query93	2387	511	515	511
query94	1246	198	197	197
query95	423	336	336	336
query96	604	271	274	271
query97	3237	3038	3045	3038
query98	247	230	209	209
query99	1204	857	859	857
Total cold run time: 274546 ms
Total hot run time: 172238 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.09	0.04	0.04
query3	0.23	0.05	0.05
query4	1.68	0.06	0.07
query5	0.50	0.48	0.50
query6	1.12	0.73	0.72
query7	0.02	0.01	0.01
query8	0.04	0.04	0.04
query9	0.54	0.49	0.49
query10	0.53	0.55	0.52
query11	0.16	0.11	0.11
query12	0.15	0.12	0.12
query13	0.59	0.59	0.61
query14	0.78	0.79	0.78
query15	0.84	0.81	0.81
query16	0.37	0.36	0.37
query17	1.05	1.03	0.94
query18	0.21	0.25	0.26
query19	1.83	1.70	1.66
query20	0.01	0.01	0.01
query21	15.75	0.67	0.65
query22	4.10	7.62	1.78
query23	18.28	1.40	1.23
query24	1.54	0.35	0.21
query25	0.13	0.09	0.08
query26	0.26	0.17	0.17
query27	0.07	0.08	0.07
query28	13.36	1.01	1.01
query29	13.32	3.36	3.28
query30	0.24	0.06	0.07
query31	2.85	0.39	0.38
query32	3.28	0.48	0.46
query33	2.89	2.86	2.93
query34	17.03	4.40	4.44
query35	4.47	4.47	4.52
query36	0.70	0.48	0.45
query37	0.18	0.15	0.15
query38	0.15	0.14	0.15
query39	0.04	0.03	0.03
query40	0.16	0.14	0.15
query41	0.09	0.05	0.04
query42	0.05	0.05	0.04
query43	0.04	0.04	0.04
Total cold run time: 109.76 s
Total hot run time: 30.21 s

morrySnow
morrySnow previously approved these changes Jun 3, 2024
@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 3, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2024

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

@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2024

PR approved by anyone and no changes requested.

@morrySnow morrySnow self-requested a review June 3, 2024 09:05
@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jun 3, 2024
@Dragonliu2018
Copy link
Contributor Author

run buildall

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jun 3, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Jun 3, 2024

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17622	4296	4232	4232
q2	2027	196	200	196
q3	10448	1126	1052	1052
q4	10205	817	902	817
q5	7483	2745	2739	2739
q6	231	134	141	134
q7	953	651	618	618
q8	9214	2111	2116	2111
q9	9390	6791	6764	6764
q10	9298	3948	3894	3894
q11	435	240	249	240
q12	422	245	257	245
q13	17436	3214	3393	3214
q14	277	242	237	237
q15	534	471	478	471
q16	493	384	386	384
q17	994	583	718	583
q18	8463	7963	7791	7791
q19	8993	1530	1643	1530
q20	655	321	326	321
q21	5181	3312	4220	3312
q22	441	351	345	345
Total cold run time: 121195 ms
Total hot run time: 41230 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4684	4537	4642	4537
q2	394	275	281	275
q3	3336	3059	3043	3043
q4	2079	1719	1736	1719
q5	5524	5639	5553	5553
q6	231	126	136	126
q7	2173	1857	1798	1798
q8	3270	3426	3336	3336
q9	8642	8615	8605	8605
q10	4074	3863	3822	3822
q11	592	511	489	489
q12	808	580	607	580
q13	15894	3047	3131	3047
q14	294	272	279	272
q15	519	465	463	463
q16	511	429	435	429
q17	1822	1480	1486	1480
q18	8127	7952	7255	7255
q19	1750	1507	1653	1507
q20	3019	1761	1789	1761
q21	8516	4726	4729	4726
q22	700	538	569	538
Total cold run time: 76959 ms
Total hot run time: 55361 ms

@doris-robot
Copy link

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

query1	910	383	376	376
query2	6450	2490	2320	2320
query3	6644	203	199	199
query4	19668	17408	17209	17209
query5	4209	444	438	438
query6	261	159	155	155
query7	4540	299	296	296
query8	307	288	285	285
query9	8435	2403	2397	2397
query10	427	294	267	267
query11	10494	10092	9977	9977
query12	138	83	89	83
query13	1603	358	376	358
query14	10169	7588	7567	7567
query15	226	191	188	188
query16	7820	263	261	261
query17	1732	516	533	516
query18	1936	268	271	268
query19	196	153	159	153
query20	97	85	88	85
query21	213	129	138	129
query22	4581	4149	4025	4025
query23	33597	33066	33075	33066
query24	10853	2796	2810	2796
query25	586	355	358	355
query26	1178	156	153	153
query27	2880	319	326	319
query28	7255	2056	2056	2056
query29	878	599	589	589
query30	301	149	152	149
query31	964	732	739	732
query32	92	56	55	55
query33	762	282	269	269
query34	982	483	478	478
query35	782	639	597	597
query36	1086	909	920	909
query37	152	67	71	67
query38	2875	2770	2725	2725
query39	885	818	799	799
query40	203	124	119	119
query41	56	50	50	50
query42	122	97	99	97
query43	588	545	548	545
query44	1231	724	753	724
query45	205	167	170	167
query46	1074	696	699	696
query47	1868	1762	1804	1762
query48	372	293	303	293
query49	1019	400	401	400
query50	778	376	383	376
query51	6996	6899	6768	6768
query52	106	89	97	89
query53	353	292	285	285
query54	841	441	443	441
query55	74	70	72	70
query56	279	265	297	265
query57	1128	1003	1054	1003
query58	253	253	248	248
query59	3496	3111	3270	3111
query60	292	276	264	264
query61	88	90	88	88
query62	626	448	452	448
query63	323	289	291	289
query64	8932	2263	1795	1795
query65	3221	3118	3108	3108
query66	797	325	331	325
query67	15414	15070	14963	14963
query68	4593	543	535	535
query69	540	412	351	351
query70	1154	1035	1156	1035
query71	410	278	289	278
query72	7465	5890	5339	5339
query73	755	318	321	318
query74	5967	5533	5497	5497
query75	3353	2657	2635	2635
query76	2460	843	903	843
query77	644	310	347	310
query78	10376	9860	9665	9665
query79	2216	534	511	511
query80	855	483	460	460
query81	557	228	221	221
query82	897	106	100	100
query83	238	166	183	166
query84	253	82	84	82
query85	1607	261	261	261
query86	511	310	305	305
query87	3266	3051	3070	3051
query88	4006	2337	2354	2337
query89	482	414	402	402
query90	1840	191	190	190
query91	180	96	97	96
query92	61	52	52	52
query93	2084	517	504	504
query94	1298	193	186	186
query95	397	313	320	313
query96	596	263	263	263
query97	3132	3061	3008	3008
query98	251	226	219	219
query99	1417	830	837	830
Total cold run time: 271760 ms
Total hot run time: 172818 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.04	0.04
query3	0.23	0.06	0.05
query4	1.67	0.09	0.09
query5	0.51	0.48	0.50
query6	1.12	0.72	0.73
query7	0.02	0.01	0.02
query8	0.04	0.04	0.04
query9	0.54	0.49	0.50
query10	0.55	0.56	0.55
query11	0.15	0.11	0.10
query12	0.15	0.12	0.11
query13	0.59	0.58	0.60
query14	0.76	0.78	0.81
query15	0.83	0.81	0.81
query16	0.35	0.36	0.38
query17	1.03	1.04	1.03
query18	0.24	0.24	0.22
query19	1.87	1.82	1.78
query20	0.01	0.00	0.01
query21	15.44	0.69	0.67
query22	4.67	7.20	1.87
query23	18.32	1.33	1.23
query24	1.96	0.22	0.20
query25	0.15	0.07	0.08
query26	0.28	0.17	0.19
query27	0.08	0.08	0.08
query28	13.33	1.02	1.01
query29	13.25	3.35	3.31
query30	0.24	0.05	0.06
query31	2.86	0.41	0.39
query32	3.25	0.48	0.47
query33	2.92	2.85	2.88
query34	17.14	4.40	4.42
query35	4.46	4.43	4.63
query36	0.65	0.46	0.47
query37	0.18	0.16	0.16
query38	0.15	0.15	0.15
query39	0.05	0.03	0.04
query40	0.18	0.14	0.15
query41	0.10	0.04	0.05
query42	0.06	0.04	0.04
query43	0.03	0.04	0.04
Total cold run time: 110.53 s
Total hot run time: 30.53 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

@dataroaring dataroaring merged commit c77e80a into apache:master Jun 12, 2024
dataroaring pushed a commit that referenced this pull request Jun 13, 2024
when types other than DATE and DATEV2 use current_date as the default
value during creating a table, throw an AnalysisException similar to the
following:
```sql
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Types other than DATE and DATEV2 cannot use current_date as the default value
```
but not this AnalysisException:
```sql
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Invalid floating-point literal: CURRENT_DATE

```
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.x dev/3.0.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] report unintuitive errors when types other than DATE and DATEV2 use current_date as the default value during creating a table.

4 participants