Skip to content

Conversation

@924060929
Copy link
Contributor

What problem does this PR solve?

  1. fix Invalid call to sql on unbound object when use interval, introduced by [enhancement](nereids) improve lots of values in insert into values statement #40202
CREATE TABLE `test_insert_cast_interval` (
  `id` int NULL,
  `dt` date NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`id`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
INSERT INTO test_insert_cast_interval values(1, date_floor('2020-02-02', interval 1 second));

(1105, 'errCode = 2, detailMessage = Invalid call to sql on unbound object')
  1. fix Insert has filtered data in strict mode, introduced by [feature](nereids)support stream load, routine load and broker load in nereids #49116
CREATE TABLE `test_insert_more_string` (
  `r_regionkey` int NULL,
  `r_name` varchar(25) NULL,
  `r_comment` varchar(152) NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`r_regionkey`) BUCKETS 1
PROPERTIES ( "replication_allocation" = "tag.location.default: 1");

insert into test_insert_more_string values (3, "akljalkjbalkjsldkrjewokjfalksdjflaksjfdlaskjfalsdkfjalsdfjkasfdl", "aa");

(1105, 'errCode = 2, detailMessage = Insert has filtered data in strict mode')

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

@Thearas
Copy link
Contributor

Thearas commented Jul 4, 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?

@924060929
Copy link
Contributor Author

run buildall

morrySnow
morrySnow previously approved these changes Jul 4, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Jul 4, 2025

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

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

github-actions bot commented Jul 4, 2025

PR approved by anyone and no changes requested.

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Jul 4, 2025
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17600	5191	5003	5003
q2	1939	264	182	182
q3	10332	1280	725	725
q4	10225	1008	511	511
q5	7478	2373	2299	2299
q6	174	158	124	124
q7	897	735	598	598
q8	9335	1293	1039	1039
q9	6708	5184	5099	5099
q10	6861	2381	1943	1943
q11	482	283	259	259
q12	343	356	216	216
q13	17783	3629	3021	3021
q14	217	225	219	219
q15	558	476	468	468
q16	418	410	366	366
q17	598	840	381	381
q18	7718	7192	7039	7039
q19	1343	946	538	538
q20	317	341	215	215
q21	3678	2525	2263	2263
q22	1071	1034	970	970
Total cold run time: 106075 ms
Total hot run time: 33478 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5249	5117	5019	5019
q2	232	321	214	214
q3	2133	2614	2238	2238
q4	1332	1804	1340	1340
q5	4140	4412	4539	4412
q6	204	165	122	122
q7	1989	1968	1839	1839
q8	2667	2608	2500	2500
q9	7313	7401	7243	7243
q10	3141	3286	2893	2893
q11	555	543	489	489
q12	658	743	597	597
q13	3712	3912	3290	3290
q14	307	296	283	283
q15	527	473	467	467
q16	430	495	465	465
q17	1170	1516	1410	1410
q18	7929	7619	7800	7619
q19	767	907	1103	907
q20	2030	2051	1808	1808
q21	4758	4309	4203	4203
q22	1092	1046	1025	1025
Total cold run time: 52335 ms
Total hot run time: 50383 ms

@doris-robot
Copy link

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

query1	984	382	381	381
query2	6516	1757	1771	1757
query3	6737	212	209	209
query4	25944	23704	23312	23312
query5	4368	563	435	435
query6	299	201	201	201
query7	4611	503	282	282
query8	259	208	220	208
query9	8620	2613	2622	2613
query10	481	321	257	257
query11	15322	15057	14785	14785
query12	160	109	118	109
query13	1638	515	385	385
query14	8502	5650	5620	5620
query15	205	177	172	172
query16	7268	632	456	456
query17	1185	697	565	565
query18	1967	391	301	301
query19	186	188	155	155
query20	118	111	109	109
query21	212	119	143	119
query22	4066	4368	4133	4133
query23	34049	33129	33175	33129
query24	8463	2387	2333	2333
query25	534	474	379	379
query26	1236	262	145	145
query27	2793	509	345	345
query28	4288	2106	2099	2099
query29	779	560	436	436
query30	288	216	198	198
query31	897	816	750	750
query32	80	72	59	59
query33	560	370	326	326
query34	789	855	532	532
query35	794	807	755	755
query36	950	965	889	889
query37	112	107	78	78
query38	4149	4105	3977	3977
query39	1480	1428	1412	1412
query40	206	117	110	110
query41	61	60	56	56
query42	128	110	109	109
query43	496	525	485	485
query44	1355	857	822	822
query45	176	173	165	165
query46	839	1019	625	625
query47	1779	1788	1711	1711
query48	381	410	298	298
query49	740	507	383	383
query50	650	701	420	420
query51	4044	4232	4084	4084
query52	111	108	99	99
query53	221	267	190	190
query54	578	567	504	504
query55	86	82	80	80
query56	301	299	272	272
query57	1167	1175	1112	1112
query58	302	272	261	261
query59	2675	2740	2613	2613
query60	328	330	318	318
query61	119	122	120	120
query62	817	714	675	675
query63	228	187	196	187
query64	4325	1061	673	673
query65	4306	4219	4160	4160
query66	1164	402	314	314
query67	15790	15640	15318	15318
query68	7797	863	528	528
query69	492	305	270	270
query70	1168	1104	1075	1075
query71	406	323	289	289
query72	5684	4673	4758	4673
query73	646	607	344	344
query74	8907	9066	8672	8672
query75	3185	3199	2684	2684
query76	3205	1148	703	703
query77	481	361	286	286
query78	9970	10070	9425	9425
query79	2044	808	568	568
query80	784	511	490	490
query81	516	256	215	215
query82	382	127	93	93
query83	247	236	227	227
query84	247	111	78	78
query85	751	350	318	318
query86	411	322	271	271
query87	4295	4431	4358	4358
query88	2926	2277	2315	2277
query89	384	305	285	285
query90	1921	204	204	204
query91	140	149	107	107
query92	71	56	55	55
query93	2160	944	580	580
query94	737	401	303	303
query95	373	280	276	276
query96	483	566	281	281
query97	2637	2741	2642	2642
query98	218	204	201	201
query99	1311	1421	1266	1266
Total cold run time: 270241 ms
Total hot run time: 184614 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.04
query2	0.07	0.04	0.04
query3	0.24	0.09	0.08
query4	1.60	0.11	0.11
query5	0.42	0.43	0.42
query6	1.18	0.65	0.64
query7	0.03	0.02	0.01
query8	0.04	0.03	0.04
query9	0.61	0.51	0.52
query10	0.56	0.56	0.58
query11	0.15	0.10	0.10
query12	0.15	0.11	0.11
query13	0.61	0.63	0.61
query14	0.79	0.81	0.79
query15	0.89	0.85	0.88
query16	0.38	0.38	0.39
query17	1.06	1.07	1.08
query18	0.22	0.21	0.21
query19	1.88	1.77	1.82
query20	0.02	0.01	0.01
query21	15.40	0.89	0.53
query22	0.76	1.20	0.67
query23	14.93	1.37	0.63
query24	7.25	1.18	0.61
query25	0.49	0.08	0.09
query26	0.64	0.17	0.13
query27	0.08	0.05	0.05
query28	9.62	0.96	0.44
query29	12.55	3.95	3.31
query30	0.25	0.09	0.07
query31	2.83	0.59	0.39
query32	3.24	0.55	0.48
query33	3.02	3.12	3.07
query34	16.10	5.43	4.81
query35	4.83	4.84	4.82
query36	0.69	0.51	0.48
query37	0.09	0.07	0.06
query38	0.04	0.04	0.03
query39	0.03	0.02	0.03
query40	0.17	0.14	0.14
query41	0.08	0.02	0.02
query42	0.03	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 104.1 s
Total hot run time: 29.23 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 25.00% (4/16) 🎉
Increment coverage report
Complete coverage report

@924060929 924060929 force-pushed the fix_insert_into_values branch from b7e5cfb to e06f84c Compare July 9, 2025 07:36
@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17585	5162	5025	5025
q2	1928	273	205	205
q3	10297	1275	706	706
q4	10236	1021	510	510
q5	7980	2341	2302	2302
q6	174	158	128	128
q7	906	752	598	598
q8	9304	1206	1085	1085
q9	6746	5090	5069	5069
q10	6881	2376	1946	1946
q11	479	285	286	285
q12	341	349	215	215
q13	17761	3678	3067	3067
q14	224	230	216	216
q15	553	482	469	469
q16	419	420	374	374
q17	577	847	343	343
q18	7511	7156	7026	7026
q19	1451	941	562	562
q20	333	334	211	211
q21	3656	3127	2319	2319
q22	352	326	295	295
Total cold run time: 105694 ms
Total hot run time: 32956 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5097	5105	5069	5069
q2	236	315	227	227
q3	2180	2644	2300	2300
q4	1344	1748	1340	1340
q5	4215	4158	4511	4158
q6	239	178	128	128
q7	2036	1903	1828	1828
q8	2751	2557	2538	2538
q9	7440	7481	7402	7402
q10	3104	3338	2919	2919
q11	594	531	501	501
q12	746	804	642	642
q13	3590	3956	3384	3384
q14	283	306	271	271
q15	541	488	506	488
q16	469	489	472	472
q17	1179	1605	1362	1362
q18	7894	7968	7382	7382
q19	841	802	995	802
q20	1984	2035	1964	1964
q21	4831	4318	4195	4195
q22	644	578	550	550
Total cold run time: 52238 ms
Total hot run time: 49922 ms

@doris-robot
Copy link

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

query1	1005	383	391	383
query2	6513	1686	1628	1628
query3	6740	210	208	208
query4	26866	23717	23229	23229
query5	4357	572	444	444
query6	296	203	187	187
query7	4624	531	294	294
query8	246	214	208	208
query9	8638	2616	2637	2616
query10	466	314	261	261
query11	15272	15372	14898	14898
query12	158	106	104	104
query13	1633	529	389	389
query14	9050	5774	5812	5774
query15	207	198	179	179
query16	7252	654	485	485
query17	1209	726	579	579
query18	1987	415	311	311
query19	198	189	173	173
query20	123	127	112	112
query21	211	123	110	110
query22	4131	4132	4024	4024
query23	33838	33205	32964	32964
query24	8533	2419	2381	2381
query25	560	487	422	422
query26	1232	269	153	153
query27	2749	510	362	362
query28	4322	2192	2107	2107
query29	756	557	440	440
query30	282	209	186	186
query31	907	825	857	825
query32	75	65	63	63
query33	556	363	312	312
query34	784	835	529	529
query35	780	800	714	714
query36	941	973	914	914
query37	107	94	77	77
query38	4140	4090	4031	4031
query39	1463	1424	1423	1423
query40	213	114	101	101
query41	62	54	52	52
query42	130	108	108	108
query43	502	503	459	459
query44	1289	810	827	810
query45	196	172	161	161
query46	822	1002	623	623
query47	1754	1763	1715	1715
query48	375	409	308	308
query49	752	481	365	365
query50	618	678	400	400
query51	4165	4146	4172	4146
query52	112	112	99	99
query53	223	283	186	186
query54	574	565	502	502
query55	79	78	82	78
query56	312	295	279	279
query57	1164	1192	1130	1130
query58	256	249	255	249
query59	2559	2623	2689	2623
query60	320	305	300	300
query61	123	118	122	118
query62	788	732	663	663
query63	221	187	193	187
query64	4312	1006	647	647
query65	4284	4181	4190	4181
query66	1145	420	369	369
query67	15664	15615	15180	15180
query68	9348	896	532	532
query69	476	310	268	268
query70	1170	1130	1091	1091
query71	459	320	306	306
query72	5564	4738	4692	4692
query73	696	587	354	354
query74	9082	9171	9110	9110
query75	4233	3212	2713	2713
query76	3843	1133	704	704
query77	972	410	319	319
query78	10030	10202	9346	9346
query79	3473	834	568	568
query80	629	507	427	427
query81	474	265	223	223
query82	495	122	98	98
query83	280	250	242	242
query84	298	108	79	79
query85	807	358	358	358
query86	343	306	279	279
query87	4468	4461	4265	4265
query88	3262	2289	2269	2269
query89	438	318	290	290
query90	1941	201	200	200
query91	139	143	113	113
query92	81	56	57	56
query93	2815	932	577	577
query94	672	392	285	285
query95	379	293	286	286
query96	485	560	281	281
query97	2683	2741	2606	2606
query98	232	209	205	205
query99	1438	1417	1306	1306
Total cold run time: 277926 ms
Total hot run time: 184986 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.03
query2	0.08	0.04	0.04
query3	0.25	0.08	0.08
query4	1.62	0.12	0.11
query5	0.42	0.42	0.40
query6	1.16	0.68	0.67
query7	0.03	0.02	0.02
query8	0.04	0.03	0.04
query9	0.60	0.51	0.51
query10	0.58	0.58	0.57
query11	0.15	0.11	0.11
query12	0.15	0.12	0.13
query13	0.63	0.61	0.62
query14	0.81	0.80	0.82
query15	0.91	0.90	0.87
query16	0.39	0.39	0.40
query17	1.05	1.04	1.10
query18	0.22	0.21	0.21
query19	2.02	1.89	1.87
query20	0.02	0.02	0.02
query21	15.39	0.86	0.54
query22	0.75	1.05	0.56
query23	15.23	1.41	0.62
query24	6.88	2.53	0.70
query25	0.51	0.23	0.10
query26	0.60	0.17	0.13
query27	0.06	0.06	0.05
query28	9.87	0.85	0.45
query29	12.53	3.95	3.28
query30	0.26	0.09	0.06
query31	2.82	0.59	0.39
query32	3.23	0.55	0.48
query33	3.04	3.08	3.15
query34	16.09	5.45	4.74
query35	4.84	4.82	4.83
query36	0.69	0.50	0.49
query37	0.10	0.07	0.07
query38	0.05	0.04	0.04
query39	0.04	0.02	0.02
query40	0.18	0.15	0.14
query41	0.08	0.02	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 104.49 s
Total hot run time: 29.33 s

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17601	5230	5093	5093
q2	1925	279	185	185
q3	10517	1305	714	714
q4	10336	997	527	527
q5	9064	2404	2337	2337
q6	206	157	128	128
q7	923	748	620	620
q8	9317	1289	1056	1056
q9	7304	5111	5126	5111
q10	6954	2393	1969	1969
q11	503	304	285	285
q12	347	349	209	209
q13	17797	3690	3056	3056
q14	231	227	216	216
q15	556	481	494	481
q16	427	421	380	380
q17	586	857	364	364
q18	7550	7273	7300	7273
q19	1111	946	538	538
q20	323	343	217	217
q21	3756	2595	2305	2305
q22	368	320	298	298
Total cold run time: 107702 ms
Total hot run time: 33362 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5103	5086	5053	5053
q2	241	323	217	217
q3	2155	2748	2304	2304
q4	1342	1765	1287	1287
q5	4267	4472	4385	4385
q6	205	174	137	137
q7	2124	1952	1766	1766
q8	2671	2560	2573	2560
q9	7364	7378	7386	7378
q10	3145	3371	2847	2847
q11	596	561	509	509
q12	706	773	665	665
q13	3881	3966	3287	3287
q14	298	290	298	290
q15	523	473	480	473
q16	471	507	449	449
q17	1195	1637	1355	1355
q18	8102	7755	7498	7498
q19	819	823	867	823
q20	2040	2142	1928	1928
q21	4849	4371	4351	4351
q22	637	627	550	550
Total cold run time: 52734 ms
Total hot run time: 50112 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 188030 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 5ac054463be4e927da785391afd5c06e018359d1, data reload: false

query1	1002	433	432	432
query2	6512	1669	1662	1662
query3	6735	208	211	208
query4	26869	23647	23702	23647
query5	4364	608	450	450
query6	333	220	202	202
query7	4628	516	288	288
query8	261	234	218	218
query9	8648	2672	2654	2654
query10	482	338	281	281
query11	15659	15426	15072	15072
query12	161	112	111	111
query13	1655	535	418	418
query14	8705	6051	6026	6026
query15	209	207	169	169
query16	7709	447	270	270
query17	1309	744	632	632
query18	2041	425	320	320
query19	200	203	163	163
query20	127	121	122	121
query21	208	129	117	117
query22	4139	4254	4053	4053
query23	34444	33342	33162	33162
query24	8552	2453	2444	2444
query25	533	488	402	402
query26	1235	261	152	152
query27	2736	532	359	359
query28	4347	2149	2108	2108
query29	713	577	452	452
query30	292	232	204	204
query31	920	884	759	759
query32	79	66	61	61
query33	542	367	295	295
query34	791	852	539	539
query35	623	663	575	575
query36	950	1002	886	886
query37	119	104	76	76
query38	4218	4173	4215	4173
query39	1505	1416	1423	1416
query40	233	119	107	107
query41	58	60	54	54
query42	130	110	113	110
query43	515	507	478	478
query44	1358	829	820	820
query45	184	182	168	168
query46	859	1064	656	656
query47	1750	1789	1742	1742
query48	382	433	337	337
query49	755	502	404	404
query50	650	706	425	425
query51	4242	4244	4188	4188
query52	113	105	95	95
query53	248	260	184	184
query54	585	569	502	502
query55	85	82	82	82
query56	312	298	297	297
query57	1215	1207	1120	1120
query58	280	269	268	268
query59	2563	2648	2532	2532
query60	339	318	316	316
query61	129	132	132	132
query62	784	726	652	652
query63	235	192	190	190
query64	4359	1248	855	855
query65	4345	4228	4235	4228
query66	1096	422	329	329
query67	15808	15762	15466	15466
query68	8076	908	522	522
query69	505	312	272	272
query70	1236	1139	1120	1120
query71	466	332	310	310
query72	5646	4827	5075	4827
query73	740	670	360	360
query74	8905	9178	9023	9023
query75	3835	3240	2712	2712
query76	3629	1277	765	765
query77	787	402	307	307
query78	11448	11394	10375	10375
query79	1944	841	607	607
query80	626	534	449	449
query81	483	267	238	238
query82	438	130	97	97
query83	264	249	237	237
query84	245	106	92	92
query85	823	385	326	326
query86	337	306	311	306
query87	4494	4487	4315	4315
query88	3430	2292	2258	2258
query89	392	330	293	293
query90	1966	215	210	210
query91	142	141	113	113
query92	74	60	57	57
query93	1437	997	601	601
query94	682	321	205	205
query95	374	296	293	293
query96	491	558	278	278
query97	2803	2806	2667	2667
query98	252	216	208	208
query99	1500	1415	1273	1273
Total cold run time: 276637 ms
Total hot run time: 188030 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.25	0.08	0.08
query4	1.62	0.11	0.11
query5	0.45	0.43	0.44
query6	1.15	0.67	0.67
query7	0.02	0.02	0.01
query8	0.04	0.04	0.03
query9	0.60	0.51	0.51
query10	0.56	0.58	0.57
query11	0.16	0.11	0.12
query12	0.15	0.12	0.12
query13	0.62	0.62	0.61
query14	0.79	0.81	0.81
query15	0.91	0.90	0.85
query16	0.40	0.39	0.39
query17	1.08	1.11	1.09
query18	0.24	0.22	0.21
query19	2.06	1.88	1.90
query20	0.01	0.01	0.02
query21	15.37	0.88	0.54
query22	0.75	1.41	0.96
query23	14.69	1.36	0.66
query24	7.08	2.09	0.93
query25	0.52	0.13	0.12
query26	0.53	0.16	0.14
query27	0.07	0.06	0.04
query28	9.99	0.84	0.44
query29	12.53	3.90	3.33
query30	0.25	0.09	0.06
query31	2.83	0.60	0.38
query32	3.23	0.55	0.48
query33	3.02	3.07	3.18
query34	16.11	5.47	4.75
query35	4.85	4.85	4.76
query36	0.67	0.51	0.50
query37	0.10	0.06	0.07
query38	0.05	0.04	0.04
query39	0.04	0.02	0.03
query40	0.18	0.14	0.13
query41	0.08	0.03	0.03
query42	0.03	0.03	0.02
query43	0.04	0.03	0.03
Total cold run time: 104.25 s
Total hot run time: 30.06 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 29.41% (5/17) 🎉
Increment coverage report
Complete coverage report

@924060929
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17562	5302	5007	5007
q2	1912	280	196	196
q3	10344	1276	695	695
q4	10255	1015	513	513
q5	7768	2397	2573	2397
q6	183	164	126	126
q7	913	747	592	592
q8	9312	1281	994	994
q9	6750	5201	5143	5143
q10	6895	2365	1961	1961
q11	486	286	273	273
q12	334	354	224	224
q13	17780	3618	3045	3045
q14	220	223	204	204
q15	563	490	483	483
q16	413	421	375	375
q17	591	875	357	357
q18	7398	7102	7158	7102
q19	1471	951	559	559
q20	322	351	219	219
q21	3626	2573	2324	2324
q22	370	318	298	298
Total cold run time: 105468 ms
Total hot run time: 33087 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5149	5073	5104	5073
q2	235	323	222	222
q3	2191	2744	2316	2316
q4	1344	1790	1372	1372
q5	4211	4171	4421	4171
q6	214	172	128	128
q7	2059	1985	1791	1791
q8	2638	2641	2592	2592
q9	7282	7308	7239	7239
q10	3127	3278	2865	2865
q11	582	529	495	495
q12	755	797	627	627
q13	3522	4017	3373	3373
q14	278	305	270	270
q15	521	484	468	468
q16	453	495	447	447
q17	1170	1612	1369	1369
q18	7879	7792	7772	7772
q19	824	803	841	803
q20	1943	1989	1808	1808
q21	4683	4310	4320	4310
q22	628	588	551	551
Total cold run time: 51688 ms
Total hot run time: 50062 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 185149 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 1aff963e80c56f22822668e82441cd89e6ee3a02, data reload: false

query1	1008	409	383	383
query2	6513	1678	1651	1651
query3	6761	210	212	210
query4	26044	23396	22848	22848
query5	4342	586	443	443
query6	295	225	204	204
query7	4633	500	292	292
query8	270	230	226	226
query9	8573	2623	2625	2623
query10	488	345	265	265
query11	15915	15082	14822	14822
query12	151	109	108	108
query13	1662	525	427	427
query14	8753	5806	5829	5806
query15	214	182	169	169
query16	7289	443	253	253
query17	1332	712	566	566
query18	1971	385	293	293
query19	188	185	156	156
query20	117	115	124	115
query21	208	127	109	109
query22	4102	4106	4059	4059
query23	33846	33112	33191	33112
query24	8461	2404	2348	2348
query25	518	481	395	395
query26	1230	274	142	142
query27	2770	501	338	338
query28	4327	2126	2092	2092
query29	765	545	435	435
query30	284	216	185	185
query31	935	839	752	752
query32	71	68	58	58
query33	554	340	283	283
query34	800	836	510	510
query35	597	634	542	542
query36	924	981	865	865
query37	118	104	82	82
query38	4181	4164	4140	4140
query39	1479	1562	1402	1402
query40	210	117	104	104
query41	56	58	56	56
query42	125	111	114	111
query43	498	505	470	470
query44	1349	817	815	815
query45	172	167	166	166
query46	840	1010	630	630
query47	1737	1788	1691	1691
query48	380	412	300	300
query49	719	480	403	403
query50	651	697	423	423
query51	4133	4189	4049	4049
query52	114	110	106	106
query53	232	252	191	191
query54	583	573	535	535
query55	82	82	85	82
query56	313	303	301	301
query57	1161	1185	1125	1125
query58	266	248	259	248
query59	2498	2663	2529	2529
query60	323	314	306	306
query61	129	126	126	126
query62	798	711	676	676
query63	231	194	191	191
query64	4406	1197	815	815
query65	4226	4159	4134	4134
query66	1135	412	313	313
query67	15857	15277	15240	15240
query68	4378	907	531	531
query69	505	327	268	268
query70	1275	1098	1070	1070
query71	398	320	300	300
query72	5834	4707	4734	4707
query73	637	583	352	352
query74	9020	9019	9022	9019
query75	3147	3196	2691	2691
query76	3187	1148	709	709
query77	495	395	296	296
query78	10956	11062	10261	10261
query79	1000	841	593	593
query80	1158	601	447	447
query81	525	255	222	222
query82	247	127	94	94
query83	347	251	238	238
query84	248	110	84	84
query85	780	367	323	323
query86	380	294	280	280
query87	4398	4463	4367	4367
query88	2971	2277	2304	2277
query89	384	320	289	289
query90	1713	221	209	209
query91	140	142	111	111
query92	62	59	60	59
query93	1005	961	591	591
query94	669	339	215	215
query95	396	301	296	296
query96	509	579	283	283
query97	2659	2765	2618	2618
query98	220	215	203	203
query99	1331	1423	1301	1301
Total cold run time: 266887 ms
Total hot run time: 185149 ms

@doris-robot
Copy link

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

query1	0.05	0.03	0.03
query2	0.08	0.04	0.04
query3	0.24	0.07	0.08
query4	1.62	0.10	0.11
query5	0.41	0.43	0.42
query6	1.18	0.65	0.65
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.59	0.52	0.51
query10	0.58	0.57	0.57
query11	0.15	0.11	0.12
query12	0.15	0.12	0.11
query13	0.62	0.61	0.61
query14	0.83	0.79	0.82
query15	0.89	0.90	0.84
query16	0.38	0.40	0.39
query17	1.04	1.04	1.07
query18	0.23	0.21	0.21
query19	1.92	1.86	1.84
query20	0.02	0.01	0.01
query21	15.42	0.90	0.56
query22	0.74	1.26	0.87
query23	14.75	1.39	0.61
query24	7.12	1.45	0.98
query25	0.54	0.19	0.09
query26	0.69	0.16	0.13
query27	0.06	0.06	0.06
query28	9.78	0.88	0.45
query29	12.56	3.88	3.27
query30	0.24	0.09	0.06
query31	2.85	0.60	0.37
query32	3.24	0.55	0.48
query33	3.10	3.09	3.16
query34	16.13	5.42	4.82
query35	4.85	4.87	4.82
query36	0.71	0.50	0.48
query37	0.09	0.07	0.07
query38	0.04	0.04	0.03
query39	0.03	0.02	0.02
query40	0.17	0.15	0.14
query41	0.08	0.02	0.03
query42	0.03	0.03	0.02
query43	0.03	0.02	0.02
Total cold run time: 104.29 s
Total hot run time: 29.85 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 45.45% (10/22) 🎉
Increment coverage report
Complete coverage report

@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Jul 10, 2025
@924060929 924060929 merged commit 2c01f69 into apache:master Jul 10, 2025
25 of 27 checks passed
@924060929 924060929 deleted the fix_insert_into_values branch July 10, 2025 03:03
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Jul 10, 2025
…nbound object' and 'Insert has filtered data in strict mode' exception (apache#52802)

1. fix `Invalid call to sql on unbound object` when use `interval`,
introduced by apache#40202
```sql
CREATE TABLE `test_insert_cast_interval` (
  `id` int NULL,
  `dt` date NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`id`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
INSERT INTO test_insert_cast_interval values(1, date_floor('2020-02-02', interval 1 second));

(1105, 'errCode = 2, detailMessage = Invalid call to sql on unbound object')
```

2. fix `Insert has filtered data in strict mode`, introduced by apache#49116
```sql
CREATE TABLE `test_insert_more_string` (
  `r_regionkey` int NULL,
  `r_name` varchar(25) NULL,
  `r_comment` varchar(152) NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`r_regionkey`) BUCKETS 1
PROPERTIES ( "replication_allocation" = "tag.location.default: 1");

insert into test_insert_more_string values (3, "akljalkjbalkjsldkrjewokjfalksdjflaksjfdlaskjfalsdkfjalsdfjkasfdl", "aa");

(1105, 'errCode = 2, detailMessage = Insert has filtered data in strict mode')
```

(cherry picked from commit 2c01f69)
morrySnow pushed a commit that referenced this pull request Jul 10, 2025
… to sql on unbound object' and 'Insert has filtered data in strict mode' exception #52802 (#53032)

cherry pick from #52802
924060929 added a commit to 924060929/incubator-doris that referenced this pull request Jul 14, 2025
…nbound object' and 'Insert has filtered data in strict mode' exception (apache#52802)

1. fix `Invalid call to sql on unbound object` when use `interval`,
introduced by apache#40202
```sql
CREATE TABLE `test_insert_cast_interval` (
  `id` int NULL,
  `dt` date NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`id`) BUCKETS 10
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
INSERT INTO test_insert_cast_interval values(1, date_floor('2020-02-02', interval 1 second));

(1105, 'errCode = 2, detailMessage = Invalid call to sql on unbound object')
```

2. fix `Insert has filtered data in strict mode`, introduced by apache#49116
```sql
CREATE TABLE `test_insert_more_string` (
  `r_regionkey` int NULL,
  `r_name` varchar(25) NULL,
  `r_comment` varchar(152) NULL
) ENGINE=OLAP
DISTRIBUTED BY HASH(`r_regionkey`) BUCKETS 1
PROPERTIES ( "replication_allocation" = "tag.location.default: 1");

insert into test_insert_more_string values (3, "akljalkjbalkjsldkrjewokjfalksdjflaksjfdlaskjfalsdkfjalsdfjkasfdl", "aa");

(1105, 'errCode = 2, detailMessage = Insert has filtered data in strict mode')
```

(cherry picked from commit 2c01f69)
yujun777 added a commit to yujun777/doris that referenced this pull request Aug 26, 2025
924060929 pushed a commit that referenced this pull request Aug 28, 2025
…r insert value truncate long string (#55325)

for below sql:

```sql
create table t(a int,  b varchar(2));
insert into t values(1, 'abcde');
```

for doris 2.0, the insert command will throw error 'Insert has filtered
data in strict mode', because length of value 'abcde' is bigger than
varchar(2).

for mysql, pg, the above sql will also throw error for the same reason.

for doris version >= 2.1.0, it will not throw error, and just truncate
'abcde' to 'ab'.

what's more, for stream load, no matter 2.0, or 2.1, ..., doris will
stream load fail.

but considering 2.1 have released for 1.5+ year, we don't want to make a
behaviour change for 2.1, so add a session variable
enable_insert_value_auto_cast, when insert value with longer string
value, then will have:

- if enable_insert_value_auto_cast = true (default), the longer string
will be truncate and insert succ;
- if enable_insert_value_auto_cast = false, enable_insert_strict =
true(default), will throw exception 'Insert has filtered data in strict
mode';
- if enable_insert_value_auto_cast = false, enable_insert_strict =
false, then the longer string will be filtered, other rows will insert
succ.
 
relate PR:  #52802
github-actions bot pushed a commit that referenced this pull request Aug 28, 2025
…r insert value truncate long string (#55325)

for below sql:

```sql
create table t(a int,  b varchar(2));
insert into t values(1, 'abcde');
```

for doris 2.0, the insert command will throw error 'Insert has filtered
data in strict mode', because length of value 'abcde' is bigger than
varchar(2).

for mysql, pg, the above sql will also throw error for the same reason.

for doris version >= 2.1.0, it will not throw error, and just truncate
'abcde' to 'ab'.

what's more, for stream load, no matter 2.0, or 2.1, ..., doris will
stream load fail.

but considering 2.1 have released for 1.5+ year, we don't want to make a
behaviour change for 2.1, so add a session variable
enable_insert_value_auto_cast, when insert value with longer string
value, then will have:

- if enable_insert_value_auto_cast = true (default), the longer string
will be truncate and insert succ;
- if enable_insert_value_auto_cast = false, enable_insert_strict =
true(default), will throw exception 'Insert has filtered data in strict
mode';
- if enable_insert_value_auto_cast = false, enable_insert_strict =
false, then the longer string will be filtered, other rows will insert
succ.
 
relate PR:  #52802
zhiqiang-hhhh pushed a commit to zhiqiang-hhhh/doris that referenced this pull request Aug 29, 2025
…r insert value truncate long string (apache#55325)

for below sql:

```sql
create table t(a int,  b varchar(2));
insert into t values(1, 'abcde');
```

for doris 2.0, the insert command will throw error 'Insert has filtered
data in strict mode', because length of value 'abcde' is bigger than
varchar(2).

for mysql, pg, the above sql will also throw error for the same reason.

for doris version >= 2.1.0, it will not throw error, and just truncate
'abcde' to 'ab'.

what's more, for stream load, no matter 2.0, or 2.1, ..., doris will
stream load fail.

but considering 2.1 have released for 1.5+ year, we don't want to make a
behaviour change for 2.1, so add a session variable
enable_insert_value_auto_cast, when insert value with longer string
value, then will have:

- if enable_insert_value_auto_cast = true (default), the longer string
will be truncate and insert succ;
- if enable_insert_value_auto_cast = false, enable_insert_strict =
true(default), will throw exception 'Insert has filtered data in strict
mode';
- if enable_insert_value_auto_cast = false, enable_insert_strict =
false, then the longer string will be filtered, other rows will insert
succ.
 
relate PR:  apache#52802
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/3.1.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants