Skip to content

Conversation

@924060929
Copy link
Contributor

cherry pick from #52802

…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)
@924060929 924060929 requested a review from morrySnow as a code owner July 10, 2025 03:18
@Thearas
Copy link
Contributor

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

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17579	6939	6599	6599
q2	2096	183	162	162
q3	10643	1139	1116	1116
q4	10375	747	726	726
q5	7730	2948	2774	2774
q6	211	135	132	132
q7	1005	626	607	607
q8	9598	1992	2046	1992
q9	7902	6383	6389	6383
q10	6993	2302	2254	2254
q11	471	259	260	259
q12	460	211	214	211
q13	17788	2994	2967	2967
q14	249	214	203	203
q15	502	475	464	464
q16	460	378	375	375
q17	980	507	584	507
q18	7207	6698	6659	6659
q19	1310	1057	954	954
q20	477	200	200	200
q21	3881	3124	3200	3124
q22	1081	996	993	993
Total cold run time: 108998 ms
Total hot run time: 39661 ms

----- Round 2, with runtime_filter_mode=off -----
q1	6675	6580	6553	6553
q2	327	227	242	227
q3	2968	2957	2913	2913
q4	1986	1827	1805	1805
q5	5683	5727	5721	5721
q6	217	123	130	123
q7	2242	1829	1786	1786
q8	3357	3526	3567	3526
q9	8745	8890	8842	8842
q10	3532	3529	3513	3513
q11	588	486	514	486
q12	804	653	613	613
q13	4057	3125	3157	3125
q14	300	273	289	273
q15	513	465	470	465
q16	497	450	454	450
q17	1849	1635	1614	1614
q18	8215	7935	7804	7804
q19	1659	1550	1490	1490
q20	2070	1869	1891	1869
q21	5185	5017	4965	4965
q22	1164	1040	1019	1019
Total cold run time: 62633 ms
Total hot run time: 59182 ms

@doris-robot
Copy link

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

query1	1279	903	900	900
query2	6234	1941	1908	1908
query3	10814	4240	4437	4240
query4	33184	23595	23416	23416
query5	3388	457	441	441
query6	275	182	180	180
query7	3999	322	326	322
query8	280	216	217	216
query9	9579	2587	2601	2587
query10	489	270	261	261
query11	17839	15170	15229	15170
query12	159	102	104	102
query13	1576	424	430	424
query14	10213	7223	6777	6777
query15	238	183	199	183
query16	8046	474	488	474
query17	1600	573	582	573
query18	2169	303	305	303
query19	223	162	166	162
query20	118	112	109	109
query21	203	111	108	108
query22	4636	4583	4411	4411
query23	35275	34112	34190	34112
query24	11723	2919	2848	2848
query25	707	432	432	432
query26	1756	174	174	174
query27	3256	356	364	356
query28	7575	2155	2164	2155
query29	1029	462	454	454
query30	277	159	165	159
query31	1049	841	860	841
query32	98	62	60	60
query33	778	309	323	309
query34	958	503	513	503
query35	868	744	727	727
query36	1098	951	967	951
query37	139	71	72	71
query38	4065	3957	3974	3957
query39	1541	1450	1459	1450
query40	263	108	112	108
query41	52	53	58	53
query42	121	104	111	104
query43	534	495	484	484
query44	1325	845	826	826
query45	198	173	181	173
query46	1172	729	744	729
query47	2010	1924	1892	1892
query48	453	371	346	346
query49	985	404	393	393
query50	849	435	425	425
query51	7402	7207	7391	7207
query52	101	90	88	88
query53	253	183	191	183
query54	1298	500	500	500
query55	81	80	82	80
query56	279	264	256	256
query57	1347	1224	1190	1190
query58	241	214	212	212
query59	3237	2984	2989	2984
query60	296	258	262	258
query61	140	121	118	118
query62	847	689	694	689
query63	225	191	188	188
query64	5113	664	689	664
query65	3340	3256	3292	3256
query66	1282	308	289	289
query67	16279	15640	15517	15517
query68	5357	597	580	580
query69	418	265	265	265
query70	1230	1127	1115	1115
query71	355	261	239	239
query72	6213	4146	4062	4062
query73	763	349	356	349
query74	10371	8950	8935	8935
query75	3381	2628	2682	2628
query76	3035	1067	956	956
query77	409	271	283	271
query78	10507	9674	9573	9573
query79	2411	594	616	594
query80	1075	421	431	421
query81	551	225	223	223
query82	854	86	89	86
query83	232	150	148	148
query84	239	77	81	77
query85	1398	302	303	302
query86	441	295	290	290
query87	4323	4267	4194	4194
query88	4418	2414	2407	2407
query89	421	299	290	290
query90	1957	189	189	189
query91	142	110	110	110
query92	65	50	50	50
query93	2209	557	559	557
query94	881	284	303	284
query95	363	259	263	259
query96	608	278	280	278
query97	3285	3106	3204	3106
query98	233	207	200	200
query99	1511	1272	1298	1272
Total cold run time: 308112 ms
Total hot run time: 196348 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 c0e284a99982f17ad7a7bac85128b5ac1ccbbda9, data reload: false

query1	0.04	0.04	0.02
query2	0.07	0.03	0.03
query3	0.22	0.07	0.07
query4	1.63	0.10	0.11
query5	0.53	0.52	0.52
query6	1.12	0.72	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.56	0.50	0.49
query10	0.56	0.54	0.54
query11	0.14	0.10	0.11
query12	0.14	0.12	0.11
query13	0.60	0.59	0.59
query14	0.77	0.79	0.79
query15	0.85	0.83	0.81
query16	0.40	0.38	0.39
query17	1.06	1.04	1.08
query18	0.23	0.21	0.22
query19	1.96	1.89	1.87
query20	0.01	0.01	0.01
query21	15.42	0.58	0.57
query22	2.32	1.97	1.60
query23	17.09	0.93	0.85
query24	3.41	1.10	1.88
query25	0.22	0.05	0.08
query26	0.68	0.14	0.14
query27	0.06	0.05	0.06
query28	9.31	0.51	0.50
query29	12.61	3.26	3.27
query30	0.25	0.07	0.06
query31	2.86	0.39	0.39
query32	3.24	0.46	0.46
query33	3.03	3.01	3.00
query34	17.02	4.48	4.50
query35	4.53	4.62	4.48
query36	0.66	0.47	0.48
query37	0.08	0.06	0.06
query38	0.04	0.03	0.03
query39	0.03	0.02	0.02
query40	0.17	0.12	0.12
query41	0.08	0.02	0.03
query42	0.04	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 104.13 s
Total hot run time: 30.21 s

@morrySnow morrySnow merged commit 7bbcb6d into apache:branch-3.1 Jul 10, 2025
21 of 22 checks passed
@924060929 924060929 deleted the branch-3.1-fix_insert_into_values- branch July 10, 2025 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants