Skip to content

Conversation

@seawinde
Copy link
Contributor

Proposed changes

This pattern of rewriting is supported for multi-table joins and supported join types is as following:

INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
LEFT SEMI JOIN
RIGHT SEMI JOIN
LEFT ANTI JOIN
RIGHT ANTI JOIN

doc pr: apache/doris-website#458

Further comments

If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...

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

@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17810	4888	4291	4291
q2	2702	166	158	158
q3	11777	1118	1202	1118
q4	10652	791	816	791
q5	8248	3016	2973	2973
q6	207	127	124	124
q7	1046	624	578	578
q8	9552	2060	2029	2029
q9	7140	6662	6469	6469
q10	8384	3430	3533	3430
q11	438	222	217	217
q12	369	211	198	198
q13	17821	2845	2854	2845
q14	227	206	198	198
q15	507	453	454	453
q16	496	369	364	364
q17	969	615	567	567
q18	7203	6470	6529	6470
q19	2217	1412	1496	1412
q20	546	275	253	253
q21	3517	2945	2862	2862
q22	358	290	292	290
Total cold run time: 112186 ms
Total hot run time: 38090 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4211	4083	4065	4065
q2	329	225	227	225
q3	2964	2844	2879	2844
q4	1877	1582	1524	1524
q5	5267	5301	5291	5291
q6	198	115	118	115
q7	2242	1812	1863	1812
q8	3187	3302	3306	3302
q9	8571	8547	8589	8547
q10	3745	3688	3699	3688
q11	559	445	458	445
q12	744	580	550	550
q13	16923	2884	2849	2849
q14	289	257	254	254
q15	494	462	467	462
q16	473	426	419	419
q17	1745	1495	1467	1467
q18	7395	7206	7098	7098
q19	1977	1461	1502	1461
q20	1936	1765	1720	1720
q21	4849	4779	4749	4749
q22	512	449	443	443
Total cold run time: 70487 ms
Total hot run time: 53330 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 182092 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 242fba2a51775a6d2c8c362cd502bb77c3c22746, data reload: false

query1	951	366	354	354
query2	7456	2003	1998	1998
query3	6721	207	231	207
query4	31341	20602	20629	20602
query5	4320	405	422	405
query6	273	185	181	181
query7	4633	299	296	296
query8	231	191	183	183
query9	9181	2387	2350	2350
query10	592	269	257	257
query11	15136	14095	14151	14095
query12	135	89	88	88
query13	1629	417	419	417
query14	11910	11049	11330	11049
query15	259	203	190	190
query16	8241	278	276	276
query17	1938	568	548	548
query18	2110	323	287	287
query19	348	161	166	161
query20	97	87	90	87
query21	211	130	133	130
query22	4652	4474	4443	4443
query23	31644	31104	31042	31042
query24	10665	2806	2733	2733
query25	617	386	386	386
query26	1379	162	165	162
query27	2948	366	353	353
query28	7390	1943	1941	1941
query29	896	648	626	626
query30	306	150	151	150
query31	993	751	711	711
query32	100	60	56	56
query33	783	261	247	247
query34	1073	469	479	469
query35	822	609	596	596
query36	1001	855	871	855
query37	123	73	74	73
query38	3604	3423	3462	3423
query39	1419	1384	1386	1384
query40	202	116	109	109
query41	48	44	47	44
query42	99	101	93	93
query43	508	456	460	456
query44	1168	725	719	719
query45	273	255	258	255
query46	1084	690	689	689
query47	1688	1581	1579	1579
query48	446	370	356	356
query49	1099	319	316	316
query50	756	381	380	380
query51	6640	6477	6653	6477
query52	104	93	88	88
query53	339	282	282	282
query54	293	259	251	251
query55	92	76	79	76
query56	246	223	212	212
query57	1088	1009	992	992
query58	219	204	197	197
query59	2832	2785	2838	2785
query60	268	236	245	236
query61	95	92	94	92
query62	635	396	416	396
query63	299	282	282	282
query64	5620	3915	3841	3841
query65	3088	2994	3021	2994
query66	1457	347	357	347
query67	14845	14468	14577	14468
query68	5481	535	533	533
query69	573	383	379	379
query70	1174	1154	1154	1154
query71	422	297	288	288
query72	6342	2804	2634	2634
query73	719	332	321	321
query74	6916	6564	6621	6564
query75	3501	2743	2823	2743
query76	3533	923	838	838
query77	395	280	277	277
query78	10422	9818	9643	9643
query79	8932	522	526	522
query80	2276	408	410	408
query81	572	213	209	209
query82	1306	200	200	200
query83	321	148	146	146
query84	292	87	81	81
query85	2123	322	311	311
query86	488	299	281	281
query87	3773	3536	3533	3533
query88	5224	2394	2379	2379
query89	540	357	360	357
query90	2035	175	175	175
query91	173	139	163	139
query92	65	47	50	47
query93	6958	521	506	506
query94	1232	180	181	180
query95	448	341	337	337
query96	609	283	274	274
query97	3093	2870	2865	2865
query98	232	210	204	204
query99	1162	754	741	741
Total cold run time: 304991 ms
Total hot run time: 182092 ms

@doris-robot
Copy link

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

Load test result on commit 242fba2a51775a6d2c8c362cd502bb77c3c22746 with default session variables
Stream load json:         19 seconds loaded 2358488459 Bytes, about 118 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      31 seconds loaded 861443392 Bytes, about 26 MB/s
Insert into select:       20.2 seconds inserted 10000000 Rows, about 495K ops/s

morrySnow
morrySnow previously approved these changes Mar 26, 2024
public abstract class AbstractMaterializedViewRule implements ExplorationRuleFactory {
public static final HashSet<JoinType> SUPPORTED_JOIN_TYPE_SET = Sets.newHashSet(JoinType.INNER_JOIN,
JoinType.LEFT_OUTER_JOIN);
public static final HashSet<JoinType> SUPPORTED_JOIN_TYPE_SET = Sets.newHashSet(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it is better use ImmutableSet

private final Map<Edge, List<? extends Expression>> pullUpViewExprWithEdge = new HashMap<>();
private final LogicalCompatibilityContext logicalCompatibilityContext;
private final Map<JoinEdge, Pair<JoinType, Set<Slot>>> inferredViewEdgeWithCond = new HashMap<>();
private final Map<JoinEdge, Pair<JoinType, Set<Set<Slot>>>> inferredViewEdgeWithCond = new HashMap<>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could u add some comment later to explain what mean about all variable's key and value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Pair rather than Set

@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 Mar 26, 2024
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

1 similar comment
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

@seawinde
Copy link
Contributor Author

run buildall

@github-actions github-actions bot removed the approved Indicates a PR has been approved by one committer. label Mar 26, 2024
@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17638	4447	4177	4177
q2	2108	156	150	150
q3	10586	1181	1187	1181
q4	10233	788	762	762
q5	7553	2971	2956	2956
q6	200	123	122	122
q7	1047	597	569	569
q8	9335	1959	1980	1959
q9	7232	6628	6537	6537
q10	8434	3466	3550	3466
q11	438	220	209	209
q12	419	202	203	202
q13	17796	2844	2867	2844
q14	240	204	201	201
q15	506	465	455	455
q16	518	369	373	369
q17	950	633	553	553
q18	7112	6493	6401	6401
q19	3021	1378	1459	1378
q20	535	243	264	243
q21	3547	2941	2942	2941
q22	337	304	296	296
Total cold run time: 109785 ms
Total hot run time: 37971 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4155	4036	4053	4036
q2	337	231	230	230
q3	2939	2831	2831	2831
q4	1858	1566	1582	1566
q5	5295	5323	5364	5323
q6	192	118	116	116
q7	2218	1871	1827	1827
q8	3143	3295	3260	3260
q9	8676	8671	8678	8671
q10	3736	3770	3780	3770
q11	537	441	435	435
q12	714	567	520	520
q13	16919	2856	2843	2843
q14	274	258	251	251
q15	476	468	462	462
q16	473	408	407	407
q17	1728	1489	1444	1444
q18	7547	7114	7155	7114
q19	1607	1417	1535	1417
q20	1879	1708	1719	1708
q21	4666	4654	4651	4651
q22	538	456	447	447
Total cold run time: 69907 ms
Total hot run time: 53329 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 181155 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 747648a57e6196704fe3669afc1880d7f23b8082, data reload: false

query1	929	365	349	349
query2	6544	1895	1836	1836
query3	6703	210	213	210
query4	31659	21195	21351	21195
query5	4305	401	393	393
query6	267	180	169	169
query7	4618	292	289	289
query8	224	167	176	167
query9	9309	2336	2301	2301
query10	566	254	265	254
query11	17268	14267	14149	14149
query12	133	87	86	86
query13	1647	452	410	410
query14	9626	7892	7814	7814
query15	283	211	197	197
query16	8155	253	249	249
query17	1978	553	547	547
query18	2097	273	267	267
query19	305	150	147	147
query20	102	83	84	83
query21	203	128	124	124
query22	5003	4819	4802	4802
query23	33133	32576	32446	32446
query24	11133	2851	2907	2851
query25	597	387	385	385
query26	1295	160	157	157
query27	3013	347	363	347
query28	7589	1896	1918	1896
query29	897	641	631	631
query30	308	153	145	145
query31	963	715	779	715
query32	95	58	55	55
query33	772	251	260	251
query34	1007	474	489	474
query35	826	612	602	602
query36	1023	901	881	881
query37	128	66	68	66
query38	3494	3416	3404	3404
query39	1457	1442	1411	1411
query40	209	116	114	114
query41	52	48	46	46
query42	104	98	95	95
query43	480	440	454	440
query44	1197	751	721	721
query45	269	260	252	252
query46	1116	699	691	691
query47	1928	1848	1841	1841
query48	445	368	363	363
query49	1131	339	335	335
query50	757	377	374	374
query51	6675	6606	6598	6598
query52	98	93	91	91
query53	348	274	278	274
query54	298	244	236	236
query55	83	83	80	80
query56	246	229	231	229
query57	1202	1151	1127	1127
query58	237	207	204	204
query59	2642	2562	2607	2562
query60	268	240	249	240
query61	115	113	131	113
query62	676	459	461	459
query63	310	280	285	280
query64	5806	4123	4124	4123
query65	3103	3056	3045	3045
query66	1154	387	376	376
query67	15177	14743	14659	14659
query68	7071	535	541	535
query69	638	380	382	380
query70	1224	1180	1116	1116
query71	510	276	264	264
query72	6936	2702	2524	2524
query73	728	316	315	315
query74	7869	6423	6369	6369
query75	3430	2207	2234	2207
query76	4521	872	924	872
query77	669	249	254	249
query78	10923	10126	10154	10126
query79	10210	519	531	519
query80	1506	367	367	367
query81	531	208	214	208
query82	857	88	86	86
query83	212	147	144	144
query84	285	77	75	75
query85	1498	317	314	314
query86	479	308	320	308
query87	3770	3552	3499	3499
query88	5167	2389	2383	2383
query89	524	362	361	361
query90	1980	172	174	172
query91	173	140	139	139
query92	70	51	48	48
query93	7411	503	501	501
query94	1253	179	184	179
query95	454	339	326	326
query96	601	269	273	269
query97	2651	2467	2464	2464
query98	232	209	204	204
query99	1259	942	909	909
Total cold run time: 311422 ms
Total hot run time: 181155 ms

@doris-robot
Copy link

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

Load test result on commit 747648a57e6196704fe3669afc1880d7f23b8082 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          59 seconds loaded 1101869774 Bytes, about 17 MB/s
Stream load parquet:      32 seconds loaded 861443392 Bytes, about 25 MB/s
Insert into select:       13.8 seconds inserted 10000000 Rows, about 724K ops/s

@seawinde
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17601	4192	4089	4089
q2	2104	159	151	151
q3	10580	1184	1226	1184
q4	10238	778	731	731
q5	7495	3040	2997	2997
q6	203	126	123	123
q7	1015	589	561	561
q8	9340	1997	2003	1997
q9	7205	6618	6553	6553
q10	8427	3402	3543	3402
q11	437	226	217	217
q12	425	200	188	188
q13	17816	2861	2843	2843
q14	234	204	215	204
q15	508	457	453	453
q16	496	372	367	367
q17	964	509	635	509
q18	7143	6368	6311	6311
q19	1578	1461	1405	1405
q20	574	245	246	245
q21	3660	2995	2909	2909
q22	331	298	293	293
Total cold run time: 108374 ms
Total hot run time: 37732 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4136	4092	4145	4092
q2	327	233	237	233
q3	2959	2897	2849	2849
q4	1801	1547	1561	1547
q5	5272	5361	5327	5327
q6	202	115	117	115
q7	2244	1874	1865	1865
q8	3165	3310	3315	3310
q9	8716	8742	8773	8742
q10	3782	3796	3743	3743
q11	541	451	446	446
q12	738	595	540	540
q13	16940	2858	2852	2852
q14	279	253	259	253
q15	494	457	468	457
q16	467	429	427	427
q17	1725	1523	1456	1456
q18	7436	7223	7134	7134
q19	1647	1514	1533	1514
q20	1932	1705	1702	1702
q21	4727	4580	4781	4580
q22	521	435	447	435
Total cold run time: 70051 ms
Total hot run time: 53619 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 181790 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 709f2894c6415912458d4702263938fee39efca1, data reload: false

query1	943	367	350	350
query2	6557	1906	1905	1905
query3	6702	230	222	222
query4	31993	21567	21421	21421
query5	4317	402	394	394
query6	267	187	169	169
query7	4636	304	298	298
query8	242	176	171	171
query9	9129	2284	2274	2274
query10	570	256	251	251
query11	17190	14208	14170	14170
query12	145	93	93	93
query13	1620	435	422	422
query14	10071	7219	7612	7219
query15	238	198	209	198
query16	8050	270	267	267
query17	1927	560	544	544
query18	2024	279	288	279
query19	246	159	149	149
query20	92	89	86	86
query21	197	125	126	125
query22	5003	4862	4755	4755
query23	33502	32571	32608	32571
query24	10857	2874	2881	2874
query25	607	381	364	364
query26	1204	157	162	157
query27	3054	344	349	344
query28	7641	1895	1884	1884
query29	915	640	630	630
query30	301	148	151	148
query31	1010	752	747	747
query32	108	60	55	55
query33	767	258	255	255
query34	1093	486	490	486
query35	846	629	617	617
query36	1012	897	904	897
query37	121	64	64	64
query38	3629	3462	3419	3419
query39	1504	1438	1413	1413
query40	211	120	115	115
query41	52	49	48	48
query42	108	100	97	97
query43	483	445	476	445
query44	1175	740	744	740
query45	284	257	271	257
query46	1128	719	729	719
query47	1913	1839	1841	1839
query48	468	365	374	365
query49	1138	355	350	350
query50	764	374	373	373
query51	6744	6643	6604	6604
query52	122	94	96	94
query53	349	279	281	279
query54	297	255	252	252
query55	88	82	82	82
query56	258	234	240	234
query57	1203	1133	1126	1126
query58	241	223	219	219
query59	2717	2704	2690	2690
query60	271	250	257	250
query61	116	115	117	115
query62	679	471	462	462
query63	300	281	280	280
query64	5864	4047	4044	4044
query65	3083	3013	3040	3013
query66	896	389	378	378
query67	15447	14979	15006	14979
query68	5261	534	533	533
query69	578	389	379	379
query70	1226	1178	1133	1133
query71	427	274	268	268
query72	6372	2717	2563	2563
query73	714	314	316	314
query74	6957	6430	6389	6389
query75	2977	2218	2204	2204
query76	3547	964	873	873
query77	525	267	259	259
query78	10915	10296	10052	10052
query79	8551	547	555	547
query80	1911	383	376	376
query81	552	221	230	221
query82	1663	88	92	88
query83	332	154	148	148
query84	286	77	77	77
query85	1666	327	317	317
query86	490	320	336	320
query87	3767	3569	3571	3569
query88	5230	2378	2370	2370
query89	527	374	377	374
query90	1997	179	178	178
query91	170	140	158	140
query92	59	53	48	48
query93	6801	514	496	496
query94	1234	182	178	178
query95	435	345	331	331
query96	633	278	268	268
query97	2638	2498	2480	2480
query98	227	216	208	208
query99	1220	953	953	953
Total cold run time: 306617 ms
Total hot run time: 181790 ms

@doris-robot
Copy link

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

Load test result on commit 709f2894c6415912458d4702263938fee39efca1 with default session variables
Stream load json:         18 seconds loaded 2358488459 Bytes, about 124 MB/s
Stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
Stream load parquet:      32 seconds loaded 861443392 Bytes, about 25 MB/s
Insert into select:       14.4 seconds inserted 10000000 Rows, about 694K ops/s

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

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

@morrySnow morrySnow merged commit 3a31fe3 into apache:master Mar 27, 2024
seawinde added a commit to seawinde/doris that referenced this pull request Mar 27, 2024
…terialized view (apache#32685)

This pattern of rewriting is supported for multi-table joins and supported join types is as following:

INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
LEFT SEMI JOIN
RIGHT SEMI JOIN
LEFT ANTI JOIN
RIGHT ANTI JOIN
yiguolei pushed a commit that referenced this pull request Mar 27, 2024
…terialized view (#32685) (#32909)

This pattern of rewriting is supported for multi-table joins and supported join types is as following:

INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
LEFT SEMI JOIN
RIGHT SEMI JOIN
LEFT ANTI JOIN
RIGHT ANTI JOIN
Jibing-Li added a commit that referenced this pull request Mar 29, 2024
* [fix](merge cloud) Fix cloud be set be tag map (#32864)

* [chore] Add gavinchou to collaborators (#32881)

* [chore](show) support statement to show views from table (#32358)

MySQL [test]> show views;
+----------------+
| Tables_in_test |
+----------------+
| t1_view        |
| t2_view        |
+----------------+
2 rows in set (0.00 sec)

MySQL [test]> show views like '%t1%';
+----------------+
| Tables_in_test |
+----------------+
| t1_view        |
+----------------+
1 row in set (0.01 sec)

MySQL [test]> show views where create_time > '2024-03-18';
+----------------+
| Tables_in_test |
+----------------+
| t2_view        |
+----------------+
1 row in set (0.02 sec)

* [Enhancement](ranger) Disable some permission operations when Ranger or LDAP are enabled (#32538)

Disable some permission operations when Ranger or LDAP are enabled.

* [chore](ci) exclude unstable trino_connector case (#32892)

Co-authored-by: stephen <hello-stephen@qq.com>

* [fix](Nereids) NPE when create table with implicit index type (#32893)

* [improvement](mtmv) Support more join types for query rewriting by materialized view (#32685)

This pattern of rewriting is supported for multi-table joins and supported join types is as following:

INNER JOIN
LEFT OUTER JOIN
RIGHT OUTER JOIN
FULL OUTER JOIN
LEFT SEMI JOIN
RIGHT SEMI JOIN
LEFT ANTI JOIN
RIGHT ANTI JOIN

* [Serde](Variant) support arrow serialization for varint type (#32780)

* [fix](multicatalog) fix no data error when read hive table on cosn (#32815)

Currently, when reading a hive on cosn table, doris return empty result, but the table has data.
iceberg on cosn is ok.
The reason is misuse of cosn's file sytem. according to cosn's doc, its fs.cosn.impl should be org.apache.hadoop.fs.CosFileSystem

* [fix](nereids)EliminateGroupByConstant should replace agg's output after removing constant group by keys (#32878)

* [Fix](executor)Fix regression test for test_active_queries/test_backend_active_tasks #32899

* [fix](iceberg) fix iceberg catalog bug and p2 test cases (#32898)

1. Fix iceberg catalog bug

    This PR #30198 change the logic of `IcebergHMSExternalCatalog.java`,
    to get locationUrl by calling hive metastore's `getCatalog()` method.
    But this method only exists in hive 3+. So it will fail if we using hive 2.x.

    I temporary remove this logic, because this logic is only used from iceberg table writing.
    Which is still under development. We will rethink this logic later.

2. Fix test cases

    Some of P2 test cases missed `order_qt`. And because the output format of the floating point
    type is changed, some result in `out` files need to be regenerated.

* [revert](jni) revert part of #32455 (#32904)

* [fix](spill) Avoid releasing resources while spill tasks are executing (#32783)

* [chore](log) print query id before logging profile in be.INFO (#32922)

* [fix](grace-exit) Stop incorrectly of reportwork cause heap use after free #32929

* [improvement](decommission be) decommission check replica num (#32748)

* [fix](arrow-flight) Fix reach limit of connections error (#32911)

Fix Reach limit of connections error
in fe.conf , arrow_flight_token_cache_size is mandatory less than qe_max_connection/2. arrow flight sql is a stateless protocol, connection is usually not actively disconnected, bearer token is evict from the cache will unregister ConnectContext.

Fix ConnectContext.command not be reset to COM_SLEEP in time, this will result in frequent kill connection after query timeout.

Fix bearer token evict log and exception.

TODO: use arrow flight session: https://mail.google.com/mail/u/0/#inbox/FMfcgzGxRdxBLQLTcvvtRpqsvmhrHpdH

* [bugfix](cloud) few variable not initialized (#32868)

../../cloud/src/recycler/meta_checker.cpp
can cause uninitialised memory read.

* [fix](arrow-flight) Fix arrow flight sql compatible with JDK 17 and upgrade arrow 15.0.2 (#32796)

--add-opens=java.base/java.nio=ALL-UNNAMED, see: https://arrow.apache.org/docs/java/install.html#java-compatibility
groovy use flight sql connection to execute query SUM(MAX(c1) OVER (PARTITION BY)) report error: AGGREGATE clause must not contain analytic expressions, but no problem in Java execute it with jdbc::arrow-flight-sql.
groovy not support print arrow array type, throw IndexOutOfBoundsException.
"arrow_flight_sql" not support two phase read
./run-regression-test.sh --run --clean -g arrow_flight_sql

* [fix](spill) SpillStream's writer maybe may not have been finalized (#32931)

* [improvement](spill) Disable DistinctStreamingAgg when spill is enabled (#32932)

* [Improve](inverted_index) update clucene and improve array inverted index writer  (#32436)

* [Performance](exec) replace SipHash in function by XXHash (#32919)

* [feature](agg) add aggregate function sum0 (#32541)

* [improvement](mtmv) Support to get tables in materialized view when collecting table in plan (#32797)

Support to get tables in materialized view when collecting table in plan

table scehma as fllowing:

create materialized view mv1
BUILD IMMEDIATE REFRESH COMPLETE ON MANUAL
DISTRIBUTED BY RANDOM BUCKETS 1 
PROPERTIES ('replication_num' = '1')
 as 
select 
  t1.c1, 
  t3.c2 
from 
  table1 t1 
  inner join table3 t3 on t1.c1 = t3.c2

if get table from the plan as follwoing, we can get [table1, table3, table2], the mv1 is expanded to get base tables;

SELECT 
  mv1.*, 
  uuid() 
FROM 
  mv1 LEFT SEMI 
  JOIN table2 ON mv1.c1 = table2.c1 
WHERE 
  mv1.c1 IN (
    SELECT 
      c1 
    FROM 
      table2
  ) 
  OR mv1.c1 < 10

* [enhance](mtmv)support olap table partition column is null (#32698)

* [enhancement](cloud) add table version to cloud (#32738)

Add table version to cloud.

In Fe:
Get: If Fe is cloud mode, get table version from meta service.
Update: Op drop/replace temp partition, commit transaction.

In meta service:
Add: create Index. init value is 1.
Remove: by recycler.
Update: commit/drop partition rpc, commit txn rpc. Atomic++.

* [fix](cloud) schema change from not null to null (#32913)

1. Use equals instead of == for type comparing
2. null bitmap size is reisze by size of ref column.

* [feature](Nereids): add ColumnPruningPostProcessor. (#32800)

* [case](rowpolicy)fix row policy has been exist (#32880)

* [fix](pipeline) fix use error row desc when origin block clear (#32803)

* [fix](Nereids) support variant column with index when create table (#32948)

* [opt](Nereids) support create table with variant type (#32953)

* [test](insert-overwrite) Add insert overwrite auto detect concurrency cases (#32935)

* [fix](compile) fe cannot compile in idea (#32955)

* [enhancement](plsql) Support select * from routines (#32866)

Support show of plsql procedure using select * from routines.

* [fix](trino-connector) fix `NoClassDefFoundError` of hudi `Utils` class (#32846)

Due to the change of this PR #32455 , the `trino-connector-scanner` package cannot access the `hudi_scanner` package, so the exception NoclassDeffounderror will appear.

We need to write a separate Utils class.

* [exec](column) change some complex column move to noexcept (#32954)

* [Enhancement](data skew) extends show data skew (#32732)

* [chore](test) let suite compatible with Nereids (#32964)

* Support identical column name in different index. (#32792)

* Limit the max string length to 1024 while collecting column stats to control BE memory usage. (#32470)

* [fix](merge-iterator) fix NOT_IMPLEMENTED_ERROR when read next block view (#32961)

* [improvement](executor)Add tag property for workload group #32874

* [fix](auth)unified workload and resource permission logic (#32907)

- `Grant resource` can no longer grant global `usage_priv`
-  `grant resource %` instead of `grant resource *`

before change:
```
grant usage_priv on resource * to f;
show grants for f\G
*************************** 1. row ***************************
      UserIdentity: 'f'@'%'
           Comment: 
          Password: No
             Roles: 
       GlobalPrivs: Usage_priv 
      CatalogPrivs: NULL
     DatabasePrivs: internal.information_schema: Select_priv ; internal.mysql: Select_priv 
        TablePrivs: NULL
          ColPrivs: NULL
     ResourcePrivs: NULL
 CloudClusterPrivs: NULL
WorkloadGroupPrivs: normal: Usage_priv 
```
after change
```
grant usage_priv on resource '%' to f;
show grants for f\G
*************************** 1. row ***************************
      UserIdentity: 'f'@'%'
           Comment: 
          Password: No
             Roles: 
       GlobalPrivs: NULL
      CatalogPrivs: NULL
     DatabasePrivs: internal.information_schema: Select_priv ; internal.mysql: Select_priv 
        TablePrivs: NULL
          ColPrivs: NULL
     ResourcePrivs: %: Usage_priv 
 CloudClusterPrivs: NULL
WorkloadGroupPrivs: normal: Usage_priv 

```

---------

Co-authored-by: yujun <yu.jun.reach@gmail.com>
Co-authored-by: Gavin Chou <gavineaglechou@gmail.com>
Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>
Co-authored-by: yongjinhou <109586248+yongjinhou@users.noreply.github.com>
Co-authored-by: Dongyang Li <hello_stephen@qq.com>
Co-authored-by: stephen <hello-stephen@qq.com>
Co-authored-by: morrySnow <101034200+morrySnow@users.noreply.github.com>
Co-authored-by: seawinde <149132972+seawinde@users.noreply.github.com>
Co-authored-by: lihangyu <15605149486@163.com>
Co-authored-by: Yulei-Yang <yulei.yang0699@gmail.com>
Co-authored-by: starocean999 <40539150+starocean999@users.noreply.github.com>
Co-authored-by: wangbo <wangbo@apache.org>
Co-authored-by: Mingyu Chen <morningman@163.com>
Co-authored-by: Jerry Hu <mrhhsg@gmail.com>
Co-authored-by: zhiqiang <seuhezhiqiang@163.com>
Co-authored-by: Xinyi Zou <zouxinyi02@gmail.com>
Co-authored-by: Vallish Pai <vallishpai@gmail.com>
Co-authored-by: amory <wangqiannan@selectdb.com>
Co-authored-by: HappenLee <happenlee@hotmail.com>
Co-authored-by: Jensen <czjourney@163.com>
Co-authored-by: zhangdong <493738387@qq.com>
Co-authored-by: Yongqiang YANG <98214048+dataroaring@users.noreply.github.com>
Co-authored-by: jakevin <jakevingoo@gmail.com>
Co-authored-by: Mryange <59914473+Mryange@users.noreply.github.com>
Co-authored-by: zclllyybb <zhaochangle@selectdb.com>
Co-authored-by: Tiewei Fang <43782773+BePPPower@users.noreply.github.com>
Co-authored-by: Xin Liao <liaoxinbit@126.com>
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.1-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants