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](partition) Add range to list part table #47200

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wyxxxcat
Copy link
Contributor

@wyxxxcat wyxxxcat commented Jan 19, 2025

What problem does this PR solve?

Issue Number: close #xxx
before:

mysql> CREATE TABLE t (
    ->     id int null,
    ->     k largeint null
    -> )
    -> PARTITION BY LIST (`id`, `k`)
    -> (
    -> )
    -> DISTRIBUTED BY HASH(`k`) BUCKETS 16
    -> PROPERTIES (
    ->     "replication_num" = "1"
    -> );
Query OK, 0 rows affected (0.00 sec)

mysql> ALTER TABLE t ADD PARTITION p_0_2 VALUES [("0"), ("2"));
ERROR 1105 (HY000): errCode = 2, detailMessage = Cannot invoke "java.util.List.iterator()" because the return value of "org.apache.doris.analysis.PartitionKeyDesc.getInValues()" is null

now

mysql> ALTER TABLE t ADD PARTITION p_0_2 VALUES [("0"), ("2"));
ERROR 1105 (HY000): errCode = 2, detailMessage = Partitions types is invalid, expected In in list partitions

Related PR: #xxx

Problem Summary:

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?

@wyxxxcat
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17582	5597	5466	5466
q2	2044	315	177	177
q3	10407	1233	763	763
q4	10253	954	533	533
q5	8248	2370	2167	2167
q6	201	165	131	131
q7	907	759	609	609
q8	9239	1361	1158	1158
q9	5180	4873	4837	4837
q10	6824	2330	1887	1887
q11	509	271	260	260
q12	343	355	224	224
q13	17753	3684	3125	3125
q14	226	236	221	221
q15	522	486	472	472
q16	621	622	586	586
q17	574	865	341	341
q18	6840	6680	6519	6519
q19	1221	958	573	573
q20	327	339	194	194
q21	2977	2597	2030	2030
q22	369	341	309	309
Total cold run time: 103167 ms
Total hot run time: 32582 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5525	5542	5505	5505
q2	243	342	256	256
q3	2258	2652	2342	2342
q4	1461	1851	1401	1401
q5	4320	4785	4661	4661
q6	176	172	133	133
q7	2053	1974	1835	1835
q8	2628	2846	2737	2737
q9	7238	7149	7167	7149
q10	3037	3342	2791	2791
q11	597	522	487	487
q12	661	751	602	602
q13	3555	4010	3324	3324
q14	267	291	277	277
q15	540	497	478	478
q16	627	683	645	645
q17	1220	1723	1273	1273
q18	7751	7376	7541	7376
q19	828	1156	1083	1083
q20	2031	2026	1933	1933
q21	5731	5331	4956	4956
q22	622	653	601	601
Total cold run time: 53369 ms
Total hot run time: 51845 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193302 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 30e8de925feecfb7cf2e88da962500ea5a06c3fb, data reload: false

query1	1305	955	956	955
query2	6313	2074	2010	2010
query3	10989	4398	4330	4330
query4	60909	29096	23010	23010
query5	5575	618	461	461
query6	418	219	187	187
query7	5533	508	290	290
query8	326	238	247	238
query9	8198	2608	2571	2571
query10	459	306	254	254
query11	17603	15127	15456	15127
query12	172	126	113	113
query13	1415	540	407	407
query14	11129	7236	7352	7236
query15	216	216	185	185
query16	7321	635	485	485
query17	1157	750	568	568
query18	1941	397	319	319
query19	201	181	156	156
query20	157	118	111	111
query21	211	120	101	101
query22	4407	4829	4300	4300
query23	34328	33456	33431	33431
query24	5570	2432	2353	2353
query25	481	452	415	415
query26	661	253	160	160
query27	1848	472	326	326
query28	4061	2444	2397	2397
query29	567	532	432	432
query30	208	194	157	157
query31	952	890	846	846
query32	71	58	57	57
query33	416	369	298	298
query34	726	860	512	512
query35	832	835	775	775
query36	1036	1040	968	968
query37	128	101	79	79
query38	4318	4396	4304	4304
query39	1518	1436	1438	1436
query40	214	122	104	104
query41	52	47	49	47
query42	128	102	108	102
query43	511	537	497	497
query44	1385	822	827	822
query45	191	185	180	180
query46	889	1064	660	660
query47	1929	1904	1844	1844
query48	377	404	321	321
query49	730	506	395	395
query50	674	669	396	396
query51	7110	7110	6929	6929
query52	100	105	97	97
query53	226	249	188	188
query54	486	503	424	424
query55	83	81	81	81
query56	271	270	263	263
query57	1202	1241	1173	1173
query58	249	242	235	235
query59	2986	3123	2948	2948
query60	278	274	252	252
query61	143	114	113	113
query62	745	724	644	644
query63	223	192	181	181
query64	1328	1018	653	653
query65	3302	3154	3162	3154
query66	682	410	298	298
query67	16096	15659	15572	15572
query68	4249	823	532	532
query69	483	289	264	264
query70	1178	1126	1154	1126
query71	391	281	250	250
query72	6108	2763	3905	2763
query73	686	743	350	350
query74	10143	8933	8926	8926
query75	3238	3188	2656	2656
query76	3298	1189	774	774
query77	471	371	292	292
query78	10045	10032	9431	9431
query79	2939	809	590	590
query80	1698	622	430	430
query81	565	288	244	244
query82	360	156	119	119
query83	267	166	150	150
query84	293	96	77	77
query85	762	365	296	296
query86	458	303	312	303
query87	4567	4583	4442	4442
query88	4333	2122	2104	2104
query89	425	322	297	297
query90	1600	190	192	190
query91	140	138	108	108
query92	64	59	52	52
query93	2843	874	522	522
query94	758	409	289	289
query95	334	261	258	258
query96	489	600	286	286
query97	2775	2920	2792	2792
query98	222	209	188	188
query99	1276	1389	1268	1268
Total cold run time: 313724 ms
Total hot run time: 193302 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.07	0.03	0.03
query3	0.25	0.06	0.07
query4	1.61	0.10	0.10
query5	0.43	0.43	0.38
query6	1.14	0.66	0.65
query7	0.02	0.01	0.02
query8	0.04	0.03	0.03
query9	0.60	0.50	0.50
query10	0.56	0.56	0.56
query11	0.15	0.10	0.10
query12	0.15	0.10	0.11
query13	0.62	0.62	0.59
query14	2.71	2.74	2.82
query15	0.90	0.84	0.82
query16	0.38	0.38	0.39
query17	0.97	1.07	1.01
query18	0.24	0.22	0.21
query19	1.97	1.85	1.96
query20	0.01	0.01	0.01
query21	15.36	0.94	0.57
query22	0.75	0.89	0.63
query23	15.24	1.40	0.64
query24	3.28	0.86	1.64
query25	0.18	0.28	0.20
query26	0.29	0.14	0.14
query27	0.06	0.04	0.05
query28	14.21	0.97	0.44
query29	12.60	3.93	3.27
query30	0.24	0.08	0.06
query31	2.85	0.62	0.40
query32	3.23	0.56	0.46
query33	3.10	3.05	3.03
query34	16.77	5.16	4.49
query35	4.56	4.49	4.54
query36	0.65	0.53	0.49
query37	0.09	0.06	0.06
query38	0.05	0.04	0.04
query39	0.04	0.02	0.03
query40	0.17	0.13	0.12
query41	0.09	0.03	0.02
query42	0.03	0.02	0.03
query43	0.03	0.03	0.03
Total cold run time: 106.73 s
Total hot run time: 30.68 s

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.

3 participants