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](mtmv) Fix filter position different but same causing rewritten by materialized view fail #44575

Conversation

seawinde
Copy link
Contributor

What problem does this PR solve?

Such as mv def is as following and query is the same
this is the same filter l_orderkey is null or l_orderkey <> 1 but they are in the different position. this would cause rewrite fail, this pr fix this.

select 
  o_custkey, 
  o_orderdate, 
  o_shippriority, 
  o_comment, 
  o_orderkey, 
  orders.public_col as col1, 
  l_orderkey, 
  l_partkey, 
  l_suppkey, 
  lineitem.public_col as col2, 
  ps_partkey, 
  ps_suppkey, 
  partsupp.public_col as col3, 
  partsupp.public_col * 2 as col4, 
  o_orderkey + l_orderkey + ps_partkey * 2, 
  sum(
    o_orderkey + l_orderkey + ps_partkey * 2
  ), 
  count() as count_all 
from 
  (
    select 
      o_custkey, 
      o_orderdate, 
      o_shippriority, 
      o_comment, 
      o_orderkey, 
      orders.public_col as public_col 
    from 
      orders
  ) orders 
  left join (
    select 
      l_orderkey, 
      l_partkey, 
      l_suppkey, 
      lineitem.public_col as public_col 
    from 
      lineitem 
    where 
      l_orderkey is null 
      or l_orderkey <> 1
  ) lineitem on l_orderkey = o_orderkey 
  inner join (
    select 
      ps_partkey, 
      ps_suppkey, 
      partsupp.public_col as public_col 
    from 
      partsupp
  ) partsupp on ps_partkey = o_orderkey 
  and ps_suppkey = o_custkey 
where 
  l_orderkey is null 
  or l_orderkey <> 1 
group by 
  1, 
  2, 
  3, 
  4, 
  5, 
  6, 
  7, 
  8, 
  9, 
  10, 
  11, 
  12, 
  13, 
  14;

Issue Number: close #xxx

Related PR: #34753

Problem Summary:

Release note

Fix filter position different but same causing rewritten by materialized view fail

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

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

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?

@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17633	7481	7312	7312
q2	2041	182	162	162
q3	10569	1099	1217	1099
q4	10584	830	752	752
q5	7631	2717	2625	2625
q6	246	150	148	148
q7	1010	642	610	610
q8	9230	1866	1922	1866
q9	6603	6359	6328	6328
q10	6960	2273	2305	2273
q11	457	270	260	260
q12	423	233	220	220
q13	17755	3040	3018	3018
q14	251	210	207	207
q15	573	532	528	528
q16	656	593	610	593
q17	990	584	541	541
q18	7175	6665	6525	6525
q19	1337	1045	1107	1045
q20	460	195	185	185
q21	3954	3102	3289	3102
q22	381	323	318	318
Total cold run time: 106919 ms
Total hot run time: 39717 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7294	7353	7287	7287
q2	323	230	231	230
q3	2915	2850	2961	2850
q4	2024	1787	1770	1770
q5	5725	5696	5640	5640
q6	227	150	145	145
q7	2280	1837	1832	1832
q8	3436	3604	3528	3528
q9	8892	8862	8849	8849
q10	3616	3538	3589	3538
q11	606	522	520	520
q12	816	620	633	620
q13	13101	3360	3274	3274
q14	311	284	278	278
q15	584	514	533	514
q16	674	636	663	636
q17	1854	1671	1611	1611
q18	8261	7832	7456	7456
q19	1723	1571	1480	1480
q20	2094	1874	1908	1874
q21	5608	5388	5300	5300
q22	630	554	550	550
Total cold run time: 72994 ms
Total hot run time: 59782 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 196918 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 046db6bf21d22913986a367f54c53daa5f7033b9, data reload: false

query1	1252	926	907	907
query2	6241	2175	2155	2155
query3	10739	4067	4062	4062
query4	67698	28457	23579	23579
query5	4938	454	452	452
query6	405	184	173	173
query7	5507	300	294	294
query8	317	233	234	233
query9	8360	2753	2748	2748
query10	410	261	268	261
query11	17225	15256	15853	15256
query12	157	112	97	97
query13	1457	428	419	419
query14	10785	7260	6772	6772
query15	216	186	179	179
query16	7143	474	475	474
query17	1012	577	569	569
query18	1836	315	311	311
query19	200	153	166	153
query20	119	110	117	110
query21	199	99	105	99
query22	4730	4531	4474	4474
query23	34852	34353	34586	34353
query24	5339	2523	2449	2449
query25	504	386	388	386
query26	647	154	147	147
query27	1817	276	289	276
query28	4343	2505	2476	2476
query29	685	421	409	409
query30	218	153	151	151
query31	983	834	825	825
query32	66	55	53	53
query33	434	276	286	276
query34	935	515	517	515
query35	845	740	764	740
query36	1091	978	956	956
query37	120	73	70	70
query38	4443	4379	4363	4363
query39	1651	1481	1462	1462
query40	207	106	106	106
query41	50	48	45	45
query42	112	103	104	103
query43	587	534	520	520
query44	1203	872	863	863
query45	188	169	170	169
query46	1124	701	705	701
query47	1987	1907	1889	1889
query48	425	328	331	328
query49	721	378	388	378
query50	835	397	405	397
query51	7413	7231	7149	7149
query52	96	88	84	84
query53	250	191	183	183
query54	516	411	388	388
query55	81	77	75	75
query56	253	283	232	232
query57	1307	1162	1150	1150
query58	215	209	226	209
query59	3315	3271	2944	2944
query60	271	247	259	247
query61	104	110	108	108
query62	779	680	663	663
query63	207	189	186	186
query64	1347	662	709	662
query65	3258	3201	3236	3201
query66	693	296	313	296
query67	15991	15910	15838	15838
query68	3881	573	584	573
query69	408	254	265	254
query70	1217	1154	1114	1114
query71	345	241	254	241
query72	6402	4105	4070	4070
query73	763	369	361	361
query74	10158	9181	9035	9035
query75	3382	2660	2693	2660
query76	1709	1085	1076	1076
query77	484	282	283	282
query78	10327	9419	9330	9330
query79	1544	599	597	597
query80	882	463	461	461
query81	511	248	234	234
query82	1349	116	120	116
query83	170	143	141	141
query84	275	79	70	70
query85	874	293	296	293
query86	341	301	297	297
query87	4751	4689	4567	4567
query88	3780	2267	2187	2187
query89	425	292	355	292
query90	2053	188	185	185
query91	134	103	101	101
query92	64	49	50	49
query93	2026	553	544	544
query94	794	286	299	286
query95	346	247	240	240
query96	626	282	280	280
query97	2905	2678	2669	2669
query98	225	196	191	191
query99	1595	1324	1324	1324
Total cold run time: 318200 ms
Total hot run time: 196918 ms

@doris-robot
Copy link

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

query1	0.03	0.04	0.03
query2	0.06	0.04	0.03
query3	0.24	0.07	0.07
query4	1.63	0.10	0.10
query5	0.42	0.38	0.43
query6	1.17	0.68	0.65
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.58	0.51	0.51
query10	0.55	0.57	0.55
query11	0.15	0.10	0.11
query12	0.14	0.12	0.12
query13	0.62	0.62	0.60
query14	2.81	2.85	2.83
query15	0.91	0.83	0.84
query16	0.39	0.39	0.39
query17	1.07	1.07	1.07
query18	0.23	0.21	0.21
query19	1.91	1.77	2.02
query20	0.01	0.01	0.01
query21	15.37	0.60	0.58
query22	2.50	2.48	2.49
query23	16.98	0.95	0.85
query24	3.08	1.31	1.96
query25	0.32	0.18	0.08
query26	0.46	0.14	0.14
query27	0.04	0.04	0.04
query28	9.81	1.09	1.08
query29	12.55	3.24	3.27
query30	0.25	0.07	0.06
query31	2.87	0.38	0.40
query32	3.27	0.46	0.48
query33	3.02	2.96	3.09
query34	17.05	4.50	4.42
query35	4.46	4.54	4.52
query36	0.66	0.49	0.48
query37	0.09	0.06	0.06
query38	0.05	0.03	0.04
query39	0.03	0.03	0.03
query40	0.15	0.13	0.13
query41	0.07	0.02	0.03
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 106.13 s
Total hot run time: 33.7 s

@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17588	7463	7299	7299
q2	2032	183	162	162
q3	10567	1099	1239	1099
q4	10408	716	694	694
q5	7613	2682	2660	2660
q6	241	147	144	144
q7	983	619	600	600
q8	9249	1823	1867	1823
q9	6521	6289	6437	6289
q10	7044	2265	2350	2265
q11	471	277	261	261
q12	462	212	208	208
q13	17758	3079	3048	3048
q14	243	206	215	206
q15	583	532	528	528
q16	665	590	591	590
q17	963	519	541	519
q18	7207	6615	6712	6615
q19	1332	978	992	978
q20	456	181	175	175
q21	3982	3196	2995	2995
q22	388	328	323	323
Total cold run time: 106756 ms
Total hot run time: 39481 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7306	7304	7314	7304
q2	332	233	230	230
q3	2903	2755	2923	2755
q4	2026	1827	1819	1819
q5	5679	5617	5639	5617
q6	216	141	137	137
q7	2213	1850	1778	1778
q8	3360	3547	3453	3453
q9	8881	8747	8882	8747
q10	3621	3580	3564	3564
q11	607	508	502	502
q12	902	631	616	616
q13	11530	3273	3272	3272
q14	306	265	280	265
q15	570	524	520	520
q16	690	650	655	650
q17	1825	1636	1619	1619
q18	8177	7749	7761	7749
q19	1668	1589	1493	1493
q20	2107	1878	1869	1869
q21	5680	5605	5511	5511
q22	682	604	588	588
Total cold run time: 71281 ms
Total hot run time: 60058 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 196127 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 4973cdf02f11d526a8a1b1d43bad4d6bf0154f15, data reload: false

query1	1269	966	967	966
query2	6249	2119	2023	2023
query3	10950	3871	4004	3871
query4	67052	29144	23440	23440
query5	5039	478	435	435
query6	414	183	191	183
query7	5539	310	289	289
query8	312	229	230	229
query9	8824	2726	2713	2713
query10	458	257	241	241
query11	17460	15180	16065	15180
query12	162	105	104	104
query13	1507	424	437	424
query14	10889	7139	7207	7139
query15	220	183	183	183
query16	7031	517	471	471
query17	1076	561	564	561
query18	1786	303	304	303
query19	190	152	154	152
query20	117	118	113	113
query21	208	108	98	98
query22	4760	4628	4695	4628
query23	34841	34339	34604	34339
query24	5371	2441	2569	2441
query25	517	395	409	395
query26	684	155	154	154
query27	1887	287	311	287
query28	4115	2486	2443	2443
query29	700	429	429	429
query30	215	154	148	148
query31	974	828	846	828
query32	69	56	60	56
query33	391	309	274	274
query34	899	501	515	501
query35	848	728	728	728
query36	1088	961	990	961
query37	126	69	80	69
query38	4476	4449	4475	4449
query39	1543	1478	1482	1478
query40	205	105	104	104
query41	50	48	46	46
query42	115	101	102	101
query43	542	494	513	494
query44	1187	846	823	823
query45	191	171	166	166
query46	1166	730	696	696
query47	2012	1957	1939	1939
query48	463	329	315	315
query49	738	403	395	395
query50	852	387	408	387
query51	7391	7303	6953	6953
query52	98	83	92	83
query53	252	183	175	175
query54	508	389	385	385
query55	79	75	73	73
query56	267	265	252	252
query57	1288	1173	1183	1173
query58	218	235	208	208
query59	3179	3037	2928	2928
query60	277	268	244	244
query61	111	111	138	111
query62	766	671	674	671
query63	210	185	192	185
query64	1384	665	643	643
query65	3322	3208	3206	3206
query66	699	307	305	305
query67	15904	15628	15448	15448
query68	3907	573	566	566
query69	412	249	260	249
query70	1116	1120	1156	1120
query71	327	241	252	241
query72	6415	4003	4023	4003
query73	757	363	352	352
query74	10235	8963	9020	8963
query75	3394	2672	2647	2647
query76	1811	983	1076	983
query77	542	271	266	266
query78	10613	9429	9451	9429
query79	1804	672	602	602
query80	1142	450	434	434
query81	522	229	233	229
query82	233	116	114	114
query83	181	146	161	146
query84	280	72	72	72
query85	999	311	309	309
query86	381	299	304	299
query87	4890	4657	4567	4567
query88	3850	2215	2173	2173
query89	410	292	303	292
query90	2062	195	187	187
query91	136	107	106	106
query92	71	50	49	49
query93	2318	546	534	534
query94	918	324	298	298
query95	347	256	247	247
query96	616	278	272	272
query97	2857	2638	2660	2638
query98	211	196	209	196
query99	1746	1334	1309	1309
Total cold run time: 319233 ms
Total hot run time: 196127 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.04
query2	0.06	0.03	0.03
query3	0.23	0.08	0.07
query4	1.62	0.11	0.10
query5	0.45	0.41	0.41
query6	1.15	0.65	0.65
query7	0.02	0.01	0.01
query8	0.04	0.03	0.03
query9	0.58	0.52	0.50
query10	0.54	0.56	0.55
query11	0.13	0.10	0.11
query12	0.14	0.11	0.11
query13	0.61	0.60	0.60
query14	2.71	2.73	2.72
query15	0.90	0.84	0.82
query16	0.38	0.38	0.38
query17	1.04	1.02	1.00
query18	0.22	0.22	0.21
query19	1.84	1.86	1.92
query20	0.01	0.01	0.02
query21	15.36	0.59	0.58
query22	2.57	2.96	2.05
query23	17.02	1.00	0.82
query24	3.06	0.99	2.15
query25	0.30	0.13	0.14
query26	0.51	0.14	0.14
query27	0.04	0.05	0.04
query28	9.73	1.09	1.07
query29	12.59	3.30	3.28
query30	0.25	0.06	0.06
query31	2.86	0.39	0.38
query32	3.27	0.48	0.48
query33	2.98	2.99	2.98
query34	16.82	4.52	4.49
query35	4.56	4.59	4.53
query36	0.65	0.50	0.49
query37	0.09	0.07	0.06
query38	0.04	0.03	0.03
query39	0.04	0.02	0.03
query40	0.16	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: 105.76 s
Total hot run time: 33 s

@seawinde seawinde force-pushed the fix_same_filter_but_position_diff_rewrite_fail branch from 4973cdf to 4069368 Compare November 29, 2024 08:55
@seawinde seawinde force-pushed the fix_same_filter_but_position_diff_rewrite_fail branch from 4069368 to 281401c Compare November 29, 2024 08:56
@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17581	7646	7325	7325
q2	2050	173	163	163
q3	10655	1113	1157	1113
q4	10566	738	749	738
q5	7599	2728	2679	2679
q6	244	153	149	149
q7	1000	643	600	600
q8	9241	1871	1922	1871
q9	6775	6535	6628	6535
q10	7057	2310	2324	2310
q11	475	270	257	257
q12	421	216	215	215
q13	17790	3015	2995	2995
q14	245	203	211	203
q15	570	526	526	526
q16	653	571	598	571
q17	988	526	503	503
q18	7185	6809	6706	6706
q19	1322	1006	981	981
q20	465	192	200	192
q21	3976	3203	3213	3203
q22	385	314	315	314
Total cold run time: 107243 ms
Total hot run time: 40149 ms

----- Round 2, with runtime_filter_mode=off -----
q1	7305	7307	7303	7303
q2	322	236	227	227
q3	2888	2856	2893	2856
q4	2050	1804	1810	1804
q5	5654	5664	5638	5638
q6	225	147	142	142
q7	2226	1805	1789	1789
q8	3424	3567	3496	3496
q9	9100	9111	9062	9062
q10	3609	3582	3547	3547
q11	600	514	501	501
q12	803	613	636	613
q13	11368	3266	3193	3193
q14	308	270	275	270
q15	594	540	527	527
q16	682	641	667	641
q17	1889	1659	1639	1639
q18	8305	7790	7596	7596
q19	1753	1574	1686	1574
q20	2129	1859	1875	1859
q21	5549	5363	5347	5347
q22	633	579	557	557
Total cold run time: 71416 ms
Total hot run time: 60181 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 197687 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 281401ccbf01c831fa6674ebae343be7b080be1d, data reload: false

query1	1290	960	980	960
query2	6261	2056	2076	2056
query3	10977	4269	4504	4269
query4	67217	28507	23723	23723
query5	4889	452	450	450
query6	399	177	172	172
query7	5519	304	285	285
query8	314	215	212	212
query9	8234	2640	2636	2636
query10	454	262	246	246
query11	17031	15220	15866	15220
query12	162	102	103	102
query13	1464	441	450	441
query14	10376	7061	7093	7061
query15	225	184	192	184
query16	7182	456	503	456
query17	1052	575	552	552
query18	1906	302	298	298
query19	199	179	162	162
query20	120	115	110	110
query21	205	106	101	101
query22	4822	4737	4795	4737
query23	35723	34658	34686	34658
query24	5439	2496	2481	2481
query25	505	388	385	385
query26	652	151	145	145
query27	1772	281	302	281
query28	4608	2461	2442	2442
query29	668	424	417	417
query30	213	157	155	155
query31	1025	847	831	831
query32	69	58	58	58
query33	424	320	310	310
query34	948	533	514	514
query35	937	768	765	765
query36	1091	963	975	963
query37	124	79	73	73
query38	4513	4413	4442	4413
query39	1538	1454	1483	1454
query40	201	102	103	102
query41	47	46	50	46
query42	111	101	100	100
query43	551	514	503	503
query44	1172	831	837	831
query45	188	173	179	173
query46	1184	738	767	738
query47	2058	1943	1966	1943
query48	417	317	316	316
query49	722	384	394	384
query50	819	397	389	389
query51	7464	7296	7088	7088
query52	94	82	89	82
query53	255	174	174	174
query54	501	389	396	389
query55	74	71	74	71
query56	267	240	230	230
query57	1250	1116	1145	1116
query58	210	248	216	216
query59	3173	3230	2939	2939
query60	255	250	243	243
query61	109	110	113	110
query62	804	666	665	665
query63	215	186	186	186
query64	1384	676	640	640
query65	3271	3195	3200	3195
query66	709	299	300	299
query67	15987	15696	15815	15696
query68	4133	615	565	565
query69	415	255	253	253
query70	1216	1139	1043	1043
query71	361	249	237	237
query72	6135	4108	4097	4097
query73	762	371	364	364
query74	10285	9141	9116	9116
query75	3404	2701	2661	2661
query76	1847	1164	1045	1045
query77	481	271	261	261
query78	10515	9564	9343	9343
query79	1624	602	584	584
query80	891	425	440	425
query81	497	248	228	228
query82	1335	122	122	122
query83	253	151	146	146
query84	289	76	65	65
query85	946	304	305	304
query86	358	296	307	296
query87	4815	4618	4579	4579
query88	3613	2229	2197	2197
query89	433	293	285	285
query90	2037	182	183	182
query91	141	103	103	103
query92	70	52	55	52
query93	2054	537	544	537
query94	892	292	282	282
query95	344	254	251	251
query96	606	279	265	265
query97	2923	2671	2723	2671
query98	224	203	190	190
query99	1647	1314	1296	1296
Total cold run time: 319585 ms
Total hot run time: 197687 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.04
query3	0.23	0.07	0.07
query4	1.62	0.11	0.11
query5	0.42	0.40	0.39
query6	1.18	0.66	0.66
query7	0.02	0.01	0.02
query8	0.04	0.03	0.04
query9	0.58	0.50	0.51
query10	0.56	0.57	0.55
query11	0.14	0.11	0.11
query12	0.14	0.12	0.13
query13	0.61	0.60	0.60
query14	2.86	2.85	2.75
query15	0.90	0.83	0.83
query16	0.39	0.37	0.39
query17	1.07	1.04	1.04
query18	0.22	0.21	0.20
query19	1.90	1.88	2.03
query20	0.01	0.01	0.01
query21	15.36	0.59	0.55
query22	2.99	2.41	2.00
query23	17.48	0.91	0.76
query24	2.94	1.36	1.80
query25	0.20	0.09	0.10
query26	0.61	0.14	0.13
query27	0.04	0.04	0.04
query28	10.15	1.11	1.07
query29	12.54	3.27	3.27
query30	0.24	0.06	0.06
query31	2.87	0.40	0.37
query32	3.29	0.46	0.46
query33	2.98	3.07	3.05
query34	17.01	4.46	4.53
query35	4.52	4.48	4.53
query36	0.66	0.49	0.50
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.16	0.13	0.13
query41	0.07	0.03	0.02
query42	0.03	0.02	0.02
query43	0.03	0.04	0.03
Total cold run time: 107.33 s
Total hot run time: 33.25 s

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

github-actions bot commented Dec 2, 2024

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

Copy link
Contributor

github-actions bot commented Dec 2, 2024

PR approved by anyone and no changes requested.

@starocean999 starocean999 merged commit 8b94b9e into apache:master Dec 3, 2024
25 of 27 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
…by materialized view fail (#44575)

Such as mv def is as following and query is the same
this is the same filter `l_orderkey is null or l_orderkey <> 1` but they
are in the different position. this would cause rewrite fail, this pr
fix this.
```sql
select 
  o_custkey, 
  o_orderdate, 
  o_shippriority, 
  o_comment, 
  o_orderkey, 
  orders.public_col as col1, 
  l_orderkey, 
  l_partkey, 
  l_suppkey, 
  lineitem.public_col as col2, 
  ps_partkey, 
  ps_suppkey, 
  partsupp.public_col as col3, 
  partsupp.public_col * 2 as col4, 
  o_orderkey + l_orderkey + ps_partkey * 2, 
  sum(
    o_orderkey + l_orderkey + ps_partkey * 2
  ), 
  count() as count_all 
from 
  (
    select 
      o_custkey, 
      o_orderdate, 
      o_shippriority, 
      o_comment, 
      o_orderkey, 
      orders.public_col as public_col 
    from 
      orders
  ) orders 
  left join (
    select 
      l_orderkey, 
      l_partkey, 
      l_suppkey, 
      lineitem.public_col as public_col 
    from 
      lineitem 
    where 
      l_orderkey is null 
      or l_orderkey <> 1
  ) lineitem on l_orderkey = o_orderkey 
  inner join (
    select 
      ps_partkey, 
      ps_suppkey, 
      partsupp.public_col as public_col 
    from 
      partsupp
  ) partsupp on ps_partkey = o_orderkey 
  and ps_suppkey = o_custkey 
where 
  l_orderkey is null 
  or l_orderkey <> 1 
group by 
  1, 
  2, 
  3, 
  4, 
  5, 
  6, 
  7, 
  8, 
  9, 
  10, 
  11, 
  12, 
  13, 
  14;
```
Related PR: #34753 
Fix filter position different but same causing rewritten by materialized
view fail
github-actions bot pushed a commit that referenced this pull request Dec 3, 2024
…by materialized view fail (#44575)

Such as mv def is as following and query is the same
this is the same filter `l_orderkey is null or l_orderkey <> 1` but they
are in the different position. this would cause rewrite fail, this pr
fix this.
```sql
select 
  o_custkey, 
  o_orderdate, 
  o_shippriority, 
  o_comment, 
  o_orderkey, 
  orders.public_col as col1, 
  l_orderkey, 
  l_partkey, 
  l_suppkey, 
  lineitem.public_col as col2, 
  ps_partkey, 
  ps_suppkey, 
  partsupp.public_col as col3, 
  partsupp.public_col * 2 as col4, 
  o_orderkey + l_orderkey + ps_partkey * 2, 
  sum(
    o_orderkey + l_orderkey + ps_partkey * 2
  ), 
  count() as count_all 
from 
  (
    select 
      o_custkey, 
      o_orderdate, 
      o_shippriority, 
      o_comment, 
      o_orderkey, 
      orders.public_col as public_col 
    from 
      orders
  ) orders 
  left join (
    select 
      l_orderkey, 
      l_partkey, 
      l_suppkey, 
      lineitem.public_col as public_col 
    from 
      lineitem 
    where 
      l_orderkey is null 
      or l_orderkey <> 1
  ) lineitem on l_orderkey = o_orderkey 
  inner join (
    select 
      ps_partkey, 
      ps_suppkey, 
      partsupp.public_col as public_col 
    from 
      partsupp
  ) partsupp on ps_partkey = o_orderkey 
  and ps_suppkey = o_custkey 
where 
  l_orderkey is null 
  or l_orderkey <> 1 
group by 
  1, 
  2, 
  3, 
  4, 
  5, 
  6, 
  7, 
  8, 
  9, 
  10, 
  11, 
  12, 
  13, 
  14;
```
Related PR: #34753 
Fix filter position different but same causing rewritten by materialized
view fail
yiguolei pushed a commit that referenced this pull request Dec 4, 2024
…g rewritten by materialized view fail #44575 (#44900)

Cherry-picked from #44575

Co-authored-by: seawinde <[email protected]>
morrySnow pushed a commit that referenced this pull request Dec 6, 2024
…g rewritten by materialized view fail #44575 (#44899)

Cherry-picked from #44575

Co-authored-by: seawinde <[email protected]>
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.8-merged dev/3.0.4-merged reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants