Skip to content

Conversation

@zclllyybb
Copy link
Contributor

Proposed changes

Issue Number: close #xxx

before:

mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
Query OK, 0 rows affected (0.14 sec)

now:

mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Non-auto partition table not support partition expr!

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

@zclllyybb
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17613	4422	4280	4280
q2	2019	186	176	176
q3	11844	948	1091	948
q4	10510	659	724	659
q5	7776	2851	2807	2807
q6	232	144	138	138
q7	967	607	618	607
q8	9313	2072	2084	2072
q9	7329	6548	6526	6526
q10	6984	2293	2216	2216
q11	445	239	244	239
q12	398	224	227	224
q13	17746	3042	3004	3004
q14	273	245	233	233
q15	520	482	492	482
q16	584	493	514	493
q17	973	668	668	668
q18	7447	6848	6818	6818
q19	1389	1132	1075	1075
q20	700	341	330	330
q21	4359	3051	2958	2958
q22	1138	1065	1054	1054
Total cold run time: 110559 ms
Total hot run time: 38007 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4346	4271	4279	4271
q2	393	272	263	263
q3	2916	2701	2680	2680
q4	1950	1711	1598	1598
q5	5616	5669	5748	5669
q6	231	145	139	139
q7	2249	1831	1825	1825
q8	3309	3415	3433	3415
q9	8860	8820	8777	8777
q10	3591	3434	3369	3369
q11	627	513	495	495
q12	857	685	673	673
q13	15420	3167	3246	3167
q14	306	292	300	292
q15	533	501	492	492
q16	623	562	584	562
q17	1849	1519	1522	1519
q18	8085	7762	7853	7762
q19	1723	1593	1510	1510
q20	2160	1921	1899	1899
q21	5764	5310	5443	5310
q22	1147	1048	1034	1034
Total cold run time: 72555 ms
Total hot run time: 56721 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 193095 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 8369a5e9819eb182627477f512e93add86d3a0f5, data reload: false

query1	1248	882	870	870
query2	6270	2032	1958	1958
query3	10740	4120	4240	4120
query4	60080	23811	23169	23169
query5	5681	490	513	490
query6	433	168	167	167
query7	5859	291	292	291
query8	282	210	203	203
query9	8826	2497	2499	2497
query10	466	276	265	265
query11	15951	14985	15128	14985
query12	150	98	107	98
query13	1522	390	390	390
query14	10683	7536	7264	7264
query15	233	184	183	183
query16	7557	472	480	472
query17	1207	598	570	570
query18	1940	295	306	295
query19	275	153	139	139
query20	117	116	112	112
query21	206	101	101	101
query22	4680	4437	4577	4437
query23	34520	33505	33278	33278
query24	5910	2881	2813	2813
query25	521	376	404	376
query26	687	155	151	151
query27	1810	282	282	282
query28	3924	2116	2093	2093
query29	669	397	400	397
query30	231	153	148	148
query31	942	761	778	761
query32	76	54	58	54
query33	473	284	291	284
query34	860	468	479	468
query35	846	714	701	701
query36	1061	941	932	932
query37	150	94	98	94
query38	4066	3896	3877	3877
query39	1455	1377	1374	1374
query40	205	118	116	116
query41	48	49	47	47
query42	113	98	97	97
query43	523	472	477	472
query44	1090	757	757	757
query45	196	168	167	167
query46	1101	756	744	744
query47	1938	1831	1814	1814
query48	376	298	294	294
query49	769	436	472	436
query50	833	416	410	410
query51	7194	7012	6974	6974
query52	99	91	88	88
query53	253	181	183	181
query54	573	461	461	461
query55	79	78	79	78
query56	291	260	284	260
query57	1194	1105	1098	1098
query58	240	243	232	232
query59	3131	2802	2913	2802
query60	311	280	278	278
query61	129	124	120	120
query62	740	656	651	651
query63	222	183	188	183
query64	2939	780	809	780
query65	3253	3148	3158	3148
query66	607	329	340	329
query67	15583	15177	15269	15177
query68	3298	579	581	579
query69	394	274	271	271
query70	1107	1145	1070	1070
query71	336	275	275	275
query72	6288	4004	4025	4004
query73	793	332	334	332
query74	9216	8820	8800	8800
query75	3344	2719	2710	2710
query76	1414	970	994	970
query77	536	324	318	318
query78	9706	9054	9083	9054
query79	1054	537	534	534
query80	725	501	494	494
query81	545	231	237	231
query82	251	149	148	148
query83	174	154	151	151
query84	249	75	78	75
query85	784	284	324	284
query86	319	289	289	289
query87	4374	4372	4293	4293
query88	3231	2355	2347	2347
query89	392	286	288	286
query90	1885	191	189	189
query91	122	100	97	97
query92	66	52	50	50
query93	1065	522	533	522
query94	731	302	305	302
query95	354	260	259	259
query96	584	269	277	269
query97	3213	3078	3090	3078
query98	215	207	204	204
query99	1540	1257	1290	1257
Total cold run time: 304942 ms
Total hot run time: 193095 ms

@doris-robot
Copy link

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

query1	0.05	0.04	0.04
query2	0.08	0.04	0.04
query3	0.23	0.06	0.05
query4	1.67	0.07	0.07
query5	0.51	0.49	0.49
query6	1.13	0.73	0.73
query7	0.03	0.01	0.01
query8	0.05	0.04	0.05
query9	0.54	0.48	0.49
query10	0.55	0.54	0.54
query11	0.16	0.11	0.11
query12	0.14	0.12	0.13
query13	0.63	0.59	0.59
query14	2.05	2.06	2.04
query15	0.84	0.81	0.81
query16	0.37	0.35	0.38
query17	1.01	1.05	1.04
query18	0.22	0.20	0.20
query19	1.94	1.86	1.80
query20	0.01	0.01	0.01
query21	15.39	0.68	0.68
query22	3.63	8.10	1.53
query23	18.28	1.40	1.31
query24	1.85	0.31	0.22
query25	0.16	0.09	0.09
query26	0.28	0.18	0.18
query27	0.08	0.08	0.08
query28	13.26	1.02	1.00
query29	12.59	3.36	3.39
query30	0.24	0.05	0.05
query31	2.88	0.39	0.40
query32	3.27	0.48	0.48
query33	2.99	2.99	2.99
query34	17.22	4.46	4.42
query35	4.51	4.48	4.44
query36	0.66	0.46	0.47
query37	0.19	0.16	0.16
query38	0.17	0.16	0.16
query39	0.05	0.04	0.04
query40	0.15	0.13	0.14
query41	0.09	0.05	0.05
query42	0.06	0.05	0.06
query43	0.05	0.04	0.04
Total cold run time: 110.26 s
Total hot run time: 31.87 s

@github-actions
Copy link
Contributor

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

@github-actions github-actions bot added approved Indicates a PR has been approved by one committer. reviewed labels Aug 30, 2024
@github-actions
Copy link
Contributor

PR approved by anyone and no changes requested.

Copy link
Contributor

@HappenLee HappenLee left a comment

Choose a reason for hiding this comment

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

LGTM

@HappenLee HappenLee merged commit 3ff7ad3 into apache:master Aug 31, 2024
@zclllyybb zclllyybb deleted the not_auto_expr branch August 31, 2024 06:29
zclllyybb added a commit to zclllyybb/doris that referenced this pull request Sep 11, 2024
before:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
Query OK, 0 rows affected (0.14 sec)
```
now:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Non-auto partition table not support partition expr!
```
zclllyybb added a commit to zclllyybb/doris that referenced this pull request Sep 11, 2024
before:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
Query OK, 0 rows affected (0.14 sec)
```
now:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Non-auto partition table not support partition expr!
```
dataroaring pushed a commit that referenced this pull request Oct 9, 2024
before:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
Query OK, 0 rows affected (0.14 sec)
```
now:
```sql
mysql> CREATE TABLE not_auto_expr (
    ->     `TIME_STAMP` date NOT NULL
    -> )
    -> partition by range (date_trunc(`TIME_STAMP`, 'day'))()
    -> DISTRIBUTED BY HASH(`TIME_STAMP`) BUCKETS 10
    -> PROPERTIES (
    ->     "replication_allocation" = "tag.location.default: 1"
    -> );
ERROR 1105 (HY000): errCode = 2, detailMessage = errCode = 2, detailMessage = Non-auto partition table not support partition expr!
```
@yiguolei yiguolei mentioned this pull request Nov 6, 2024
@gavinchou gavinchou mentioned this pull request Nov 26, 2024
@yiguolei yiguolei mentioned this pull request Jan 19, 2025
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.7-merged dev/3.0.3-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants