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

[feat](catalog) support drop database force in external catalog #48943

Merged
merged 3 commits into from
Mar 12, 2025

Conversation

morningman
Copy link
Contributor

@morningman morningman commented Mar 11, 2025

What problem does this PR solve?

Problem Summary:

Support force keyword when dropping database in hive or iceberg catalog:

DROP DATABASE db FORCE;

Before, if there are tables in a hive or iceberg database, DROP DATABASE will not allowed.
Now, if user add force keyword, the tables in the database will be dropped, and finally the database will be dropped.

Release note

None

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

@hello-stephen
Copy link
Contributor

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?

Copy link
Contributor

PR approved by anyone and no changes requested.

@zgxme
Copy link
Contributor

zgxme commented Mar 12, 2025

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17607	5145	5049	5049
q2	2038	285	164	164
q3	10436	1261	722	722
q4	10286	1023	525	525
q5	8446	2270	2391	2270
q6	187	167	132	132
q7	893	772	620	620
q8	9307	1337	1104	1104
q9	4900	4882	4812	4812
q10	6841	2306	1870	1870
q11	480	272	255	255
q12	352	351	224	224
q13	17775	3677	3106	3106
q14	239	227	217	217
q15	519	484	475	475
q16	619	627	596	596
q17	572	846	348	348
q18	6784	6388	6309	6309
q19	2533	971	541	541
q20	311	312	190	190
q21	2634	2065	1957	1957
q22	1010	1027	991	991
Total cold run time: 104769 ms
Total hot run time: 32477 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5285	5106	5129	5106
q2	235	321	224	224
q3	2127	2631	2295	2295
q4	1440	1784	1365	1365
q5	4216	4105	4159	4105
q6	202	164	122	122
q7	1924	1899	1752	1752
q8	2688	2544	2591	2544
q9	7294	7263	7192	7192
q10	3051	3206	2762	2762
q11	577	508	483	483
q12	674	757	609	609
q13	3520	3869	3333	3333
q14	278	304	281	281
q15	531	466	489	466
q16	636	668	646	646
q17	1118	1612	1337	1337
q18	7797	7613	7446	7446
q19	809	831	974	831
q20	1958	1996	1879	1879
q21	5478	4946	4628	4628
q22	1099	1051	1018	1018
Total cold run time: 52937 ms
Total hot run time: 50424 ms

@doris-robot
Copy link

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

query1	1411	1042	980	980
query2	6203	2016	1985	1985
query3	10943	4548	4347	4347
query4	53356	25499	23287	23287
query5	5127	584	485	485
query6	359	192	184	184
query7	4978	492	290	290
query8	326	248	244	244
query9	6013	2605	2584	2584
query10	437	299	253	253
query11	15159	15070	14877	14877
query12	159	112	108	108
query13	1076	520	381	381
query14	10687	6568	7006	6568
query15	192	200	177	177
query16	6983	670	484	484
query17	1072	718	580	580
query18	1516	401	320	320
query19	191	208	155	155
query20	124	130	137	130
query21	210	124	100	100
query22	4297	4536	4468	4468
query23	33957	33354	33393	33354
query24	5720	2403	2393	2393
query25	465	480	410	410
query26	641	282	152	152
query27	1648	502	328	328
query28	2926	2414	2446	2414
query29	580	572	446	446
query30	281	222	186	186
query31	881	898	786	786
query32	72	64	62	62
query33	437	356	295	295
query34	768	846	498	498
query35	791	842	772	772
query36	933	1062	901	901
query37	118	101	82	82
query38	4102	4261	4171	4171
query39	1500	1456	1417	1417
query40	217	122	111	111
query41	53	49	54	49
query42	128	107	107	107
query43	524	538	517	517
query44	1305	813	799	799
query45	181	173	164	164
query46	848	1042	661	661
query47	1837	1915	1866	1866
query48	386	423	315	315
query49	694	521	425	425
query50	693	742	422	422
query51	4264	4312	4212	4212
query52	113	102	98	98
query53	239	269	201	201
query54	496	489	417	417
query55	86	80	81	80
query56	259	277	257	257
query57	1155	1190	1097	1097
query58	255	250	240	240
query59	2801	2980	2702	2702
query60	288	265	257	257
query61	138	156	144	144
query62	737	725	668	668
query63	230	191	194	191
query64	1400	1051	683	683
query65	4581	4429	4467	4429
query66	713	406	305	305
query67	15805	15502	15316	15316
query68	5487	874	503	503
query69	524	318	261	261
query70	1190	1135	1094	1094
query71	427	352	272	272
query72	5922	3618	3975	3618
query73	1187	761	344	344
query74	9038	9266	9021	9021
query75	3227	3147	2698	2698
query76	3850	1185	754	754
query77	531	367	285	285
query78	9993	10256	9321	9321
query79	1396	876	576	576
query80	597	516	453	453
query81	483	265	223	223
query82	205	122	93	93
query83	170	175	149	149
query84	297	92	75	75
query85	731	349	310	310
query86	326	278	376	278
query87	4416	4571	4327	4327
query88	2843	2214	2237	2214
query89	390	309	288	288
query90	1687	220	207	207
query91	139	143	110	110
query92	72	58	55	55
query93	1617	1081	579	579
query94	681	414	281	281
query95	341	270	265	265
query96	494	580	273	273
query97	3254	3450	3233	3233
query98	223	207	208	207
query99	1317	1409	1259	1259
Total cold run time: 290120 ms
Total hot run time: 192013 ms

@doris-robot
Copy link

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

query1	0.04	0.04	0.03
query2	0.07	0.03	0.04
query3	0.23	0.06	0.06
query4	1.62	0.10	0.10
query5	0.57	0.54	0.56
query6	1.18	0.72	0.72
query7	0.02	0.02	0.02
query8	0.04	0.04	0.03
query9	0.58	0.52	0.52
query10	0.61	0.59	0.59
query11	0.16	0.11	0.11
query12	0.14	0.11	0.11
query13	0.62	0.60	0.60
query14	2.81	2.81	2.82
query15	0.92	0.87	0.88
query16	0.37	0.38	0.37
query17	1.03	1.02	1.02
query18	0.21	0.20	0.20
query19	1.91	1.84	2.02
query20	0.01	0.01	0.01
query21	15.35	0.90	0.54
query22	0.78	1.26	0.91
query23	14.73	1.40	0.67
query24	6.71	1.23	0.89
query25	0.53	0.23	0.18
query26	0.67	0.16	0.14
query27	0.06	0.06	0.05
query28	9.15	0.90	0.43
query29	12.57	3.96	3.32
query30	0.26	0.09	0.06
query31	2.82	0.59	0.38
query32	3.23	0.55	0.48
query33	3.09	3.12	3.09
query34	15.80	5.14	4.52
query35	4.52	4.47	4.48
query36	0.67	0.48	0.49
query37	0.09	0.06	0.06
query38	0.06	0.04	0.03
query39	0.03	0.02	0.02
query40	0.17	0.14	0.12
query41	0.07	0.02	0.02
query42	0.04	0.02	0.02
query43	0.03	0.03	0.03
Total cold run time: 104.57 s
Total hot run time: 31.49 s

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

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

@morningman morningman merged commit 56fa9fe into apache:master Mar 12, 2025
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. dev/2.1.x-experimental dev/3.0.x-experimental reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants