Skip to content

Conversation

@hubgeter
Copy link
Contributor

@hubgeter hubgeter commented Feb 25, 2025

What problem does this PR solve?

Problem Summary:

create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

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?

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17591	5239	5112	5112
q2	2056	312	186	186
q3	10370	1243	790	790
q4	10198	1036	569	569
q5	7538	2376	2362	2362
q6	186	166	132	132
q7	913	760	621	621
q8	9295	1296	1108	1108
q9	4970	4714	4805	4714
q10	6819	2297	1880	1880
q11	478	287	265	265
q12	351	366	233	233
q13	17767	3686	3099	3099
q14	240	239	204	204
q15	520	467	465	465
q16	631	615	580	580
q17	573	850	343	343
q18	6689	6198	6194	6194
q19	1489	956	562	562
q20	324	336	191	191
q21	2810	2265	2007	2007
q22	368	329	306	306
Total cold run time: 102176 ms
Total hot run time: 31923 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5175	5172	5200	5172
q2	248	334	241	241
q3	2164	2692	2466	2466
q4	1526	1855	1426	1426
q5	4242	4186	4159	4159
q6	217	163	123	123
q7	1874	1856	1737	1737
q8	2628	2582	2639	2582
q9	7192	7140	7226	7140
q10	2997	3219	2817	2817
q11	582	524	494	494
q12	690	773	631	631
q13	3473	3885	3296	3296
q14	278	288	274	274
q15	512	477	457	457
q16	675	675	664	664
q17	1143	1603	1333	1333
q18	7621	7299	7243	7243
q19	848	857	924	857
q20	1959	2003	1877	1877
q21	5569	5068	4980	4980
q22	616	574	553	553
Total cold run time: 52229 ms
Total hot run time: 50522 ms

@doris-robot
Copy link

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

query1	1330	993	944	944
query2	6231	1865	1853	1853
query3	11141	4559	4599	4559
query4	55080	26028	22929	22929
query5	4967	671	529	529
query6	324	197	190	190
query7	4882	536	302	302
query8	313	266	238	238
query9	5481	2565	2546	2546
query10	414	321	266	266
query11	15109	15023	14878	14878
query12	166	110	128	110
query13	1042	523	369	369
query14	10168	6700	6561	6561
query15	194	226	172	172
query16	6781	666	468	468
query17	1055	719	570	570
query18	1496	405	308	308
query19	194	198	155	155
query20	127	120	121	120
query21	250	133	113	113
query22	4477	4669	4586	4586
query23	34281	33427	33456	33427
query24	5883	2509	2480	2480
query25	447	495	407	407
query26	612	279	161	161
query27	1562	488	335	335
query28	2895	2453	2427	2427
query29	601	592	454	454
query30	222	196	160	160
query31	922	899	832	832
query32	74	61	62	61
query33	416	391	328	328
query34	786	878	513	513
query35	828	852	783	783
query36	961	1002	899	899
query37	122	100	76	76
query38	4179	4285	4145	4145
query39	1520	1444	1401	1401
query40	217	120	106	106
query41	60	56	59	56
query42	136	115	116	115
query43	498	526	495	495
query44	1409	850	828	828
query45	188	222	168	168
query46	897	1064	668	668
query47	1831	1880	1755	1755
query48	406	421	308	308
query49	706	528	450	450
query50	697	765	450	450
query51	4229	4318	4272	4272
query52	110	109	100	100
query53	234	266	192	192
query54	499	499	438	438
query55	88	83	79	79
query56	289	283	279	279
query57	1161	1197	1138	1138
query58	254	242	244	242
query59	2777	2814	2609	2609
query60	290	277	271	271
query61	124	122	117	117
query62	737	748	726	726
query63	245	203	198	198
query64	1314	1060	710	710
query65	3292	3335	3268	3268
query66	769	397	298	298
query67	15767	15493	15459	15459
query68	7120	890	509	509
query69	538	296	261	261
query70	1199	1113	1089	1089
query71	468	304	277	277
query72	5930	3648	3833	3648
query73	1127	756	351	351
query74	9022	9216	8720	8720
query75	4090	3181	2721	2721
query76	4161	1171	747	747
query77	868	384	282	282
query78	10061	10155	9195	9195
query79	2881	831	602	602
query80	688	532	451	451
query81	522	273	242	242
query82	538	122	103	103
query83	171	168	150	150
query84	288	88	75	75
query85	837	351	313	313
query86	381	288	285	285
query87	4428	4500	4378	4378
query88	3458	2202	2186	2186
query89	412	322	296	296
query90	1823	192	197	192
query91	130	134	110	110
query92	74	58	60	58
query93	2440	1075	585	585
query94	638	415	297	297
query95	354	271	259	259
query96	485	554	274	274
query97	3348	3390	3286	3286
query98	221	207	210	207
query99	1341	1398	1293	1293
Total cold run time: 296799 ms
Total hot run time: 190892 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.23	0.07	0.07
query4	1.60	0.10	0.10
query5	0.55	0.56	0.55
query6	1.21	0.73	0.72
query7	0.02	0.02	0.01
query8	0.05	0.03	0.03
query9	0.60	0.54	0.52
query10	0.58	0.58	0.57
query11	0.15	0.10	0.10
query12	0.15	0.11	0.12
query13	0.61	0.60	0.60
query14	2.68	2.72	2.72
query15	0.92	0.86	0.83
query16	0.38	0.38	0.38
query17	1.00	1.00	1.05
query18	0.21	0.19	0.19
query19	1.86	1.78	2.01
query20	0.02	0.01	0.02
query21	15.38	0.91	0.54
query22	0.76	1.23	0.93
query23	14.70	1.37	0.63
query24	7.18	1.57	0.57
query25	0.51	0.40	0.07
query26	0.60	0.17	0.15
query27	0.05	0.06	0.05
query28	9.49	0.93	0.42
query29	12.57	3.95	3.28
query30	0.26	0.09	0.08
query31	2.81	0.60	0.38
query32	3.22	0.55	0.47
query33	2.98	2.98	3.02
query34	15.55	5.13	4.51
query35	4.56	4.50	4.54
query36	0.66	0.49	0.48
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.02	0.03
query40	0.18	0.13	0.13
query41	0.09	0.02	0.02
query42	0.04	0.02	0.02
query43	0.04	0.03	0.02
Total cold run time: 104.74 s
Total hot run time: 30.69 s

@hubgeter
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17953	5311	5197	5197
q2	2048	299	173	173
q3	11322	1274	747	747
q4	10207	1018	530	530
q5	7530	2407	2335	2335
q6	190	167	134	134
q7	904	765	606	606
q8	9368	1267	1090	1090
q9	5370	4988	4977	4977
q10	7019	2351	1952	1952
q11	497	293	289	289
q12	354	357	237	237
q13	19957	3738	3161	3161
q14	231	236	220	220
q15	513	472	448	448
q16	604	625	583	583
q17	693	876	340	340
q18	6603	6274	6186	6186
q19	3671	1677	584	584
q20	302	304	180	180
q21	2650	2208	1967	1967
q22	375	334	307	307
Total cold run time: 108361 ms
Total hot run time: 32243 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5319	5151	5174	5151
q2	241	322	230	230
q3	2127	2713	2298	2298
q4	1408	1827	1359	1359
q5	4245	4097	4289	4097
q6	213	167	126	126
q7	1957	1928	1777	1777
q8	2585	2579	2586	2579
q9	7235	7422	7404	7404
q10	3039	3241	2691	2691
q11	575	501	506	501
q12	735	790	631	631
q13	3633	4072	3424	3424
q14	302	320	303	303
q15	504	483	455	455
q16	654	672	664	664
q17	1201	1623	1362	1362
q18	7885	7432	7230	7230
q19	797	836	863	836
q20	2002	2045	1862	1862
q21	5503	4776	4896	4776
q22	654	583	583	583
Total cold run time: 52814 ms
Total hot run time: 50339 ms

@doris-robot
Copy link

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

query1	1344	910	941	910
query2	6192	1902	1885	1885
query3	10971	4444	4195	4195
query4	53744	24757	23033	23033
query5	5135	549	476	476
query6	339	213	183	183
query7	4899	516	311	311
query8	323	247	232	232
query9	5872	2529	2535	2529
query10	413	323	261	261
query11	15128	15089	14914	14914
query12	160	110	120	110
query13	1037	496	392	392
query14	10573	6219	6463	6219
query15	220	202	181	181
query16	6896	653	505	505
query17	1047	716	545	545
query18	1251	401	300	300
query19	202	191	177	177
query20	127	125	130	125
query21	204	124	107	107
query22	4383	4405	4511	4405
query23	33855	33483	33339	33339
query24	5686	2423	2429	2423
query25	455	470	387	387
query26	679	267	157	157
query27	1753	472	328	328
query28	3004	2457	2476	2457
query29	543	572	427	427
query30	212	195	163	163
query31	897	892	823	823
query32	75	62	66	62
query33	474	376	327	327
query34	757	854	488	488
query35	835	849	808	808
query36	961	978	864	864
query37	120	101	79	79
query38	4339	4417	4081	4081
query39	1511	1442	1457	1442
query40	204	122	112	112
query41	64	54	56	54
query42	124	111	115	111
query43	510	520	506	506
query44	1303	834	832	832
query45	174	175	176	175
query46	897	1074	668	668
query47	1844	1845	1798	1798
query48	381	410	303	303
query49	700	504	412	412
query50	717	763	415	415
query51	4285	4341	4292	4292
query52	107	109	98	98
query53	246	267	186	186
query54	475	497	408	408
query55	80	81	84	81
query56	280	279	257	257
query57	1163	1182	1098	1098
query58	243	244	263	244
query59	2766	2858	2670	2670
query60	291	265	283	265
query61	122	129	143	129
query62	731	743	658	658
query63	221	186	187	186
query64	1428	1011	673	673
query65	3299	3324	3260	3260
query66	713	395	312	312
query67	15815	15524	15379	15379
query68	6804	875	510	510
query69	542	303	270	270
query70	1180	1112	1121	1112
query71	503	312	257	257
query72	5802	3554	3723	3554
query73	1476	728	345	345
query74	8974	9002	8975	8975
query75	3840	3171	2717	2717
query76	4172	1173	741	741
query77	631	358	282	282
query78	10028	10080	9290	9290
query79	2581	819	588	588
query80	772	522	439	439
query81	520	280	242	242
query82	499	124	95	95
query83	176	163	168	163
query84	289	84	74	74
query85	773	345	297	297
query86	382	296	296	296
query87	4494	4540	4361	4361
query88	3479	2188	2190	2188
query89	404	318	291	291
query90	1797	191	191	191
query91	135	136	110	110
query92	75	56	55	55
query93	2282	1045	588	588
query94	663	403	295	295
query95	347	267	263	263
query96	483	568	268	268
query97	3371	3410	3284	3284
query98	233	204	196	196
query99	1446	1409	1339	1339
Total cold run time: 294952 ms
Total hot run time: 189908 ms

@doris-robot
Copy link

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

query1	0.04	0.03	0.03
query2	0.08	0.03	0.04
query3	0.23	0.07	0.07
query4	1.62	0.10	0.10
query5	0.57	0.57	0.56
query6	1.21	0.74	0.72
query7	0.02	0.02	0.02
query8	0.04	0.03	0.03
query9	0.57	0.55	0.52
query10	0.57	0.59	0.56
query11	0.15	0.11	0.11
query12	0.14	0.11	0.12
query13	0.61	0.60	0.60
query14	2.82	2.71	2.68
query15	0.91	0.86	0.86
query16	0.38	0.36	0.38
query17	1.01	1.04	1.06
query18	0.21	0.20	0.20
query19	1.97	1.82	1.97
query20	0.02	0.01	0.01
query21	15.37	0.91	0.54
query22	0.74	1.23	0.75
query23	14.78	1.40	0.63
query24	7.00	1.80	1.24
query25	0.47	0.28	0.07
query26	0.69	0.15	0.14
query27	0.06	0.05	0.05
query28	9.45	0.80	0.43
query29	12.55	3.93	3.28
query30	0.24	0.09	0.07
query31	2.83	0.59	0.39
query32	3.23	0.56	0.47
query33	3.02	3.22	3.10
query34	15.72	5.12	4.55
query35	4.54	4.54	4.51
query36	0.68	0.50	0.48
query37	0.08	0.06	0.06
query38	0.06	0.04	0.04
query39	0.04	0.02	0.02
query40	0.17	0.13	0.14
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 105.04 s
Total hot run time: 31.45 s

@morningman morningman added usercase Important user case type label dev/2.1.x dev/3.0.x labels Feb 26, 2025
Copy link
Contributor

@morningman morningman left a comment

Choose a reason for hiding this comment

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

LGTM

@github-actions github-actions bot added the approved Indicates a PR has been approved by one committer. label Feb 26, 2025
@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.

@morningman morningman merged commit 6d4ba9e into apache:master Feb 26, 2025
31 of 32 checks passed
github-actions bot pushed a commit that referenced this pull request Feb 26, 2025
### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
github-actions bot pushed a commit that referenced this pull request Feb 26, 2025
### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
morningman pushed a commit that referenced this pull request Feb 26, 2025
…rder #48325 (#48373)

Cherry-picked from #48325

Co-authored-by: daidai <changyuwei@selectdb.com>
dataroaring pushed a commit that referenced this pull request Feb 26, 2025
…rder #48325 (#48372)

Cherry-picked from #48325

Co-authored-by: daidai <changyuwei@selectdb.com>
zhiqiang-hhhh pushed a commit to zhiqiang-hhhh/doris that referenced this pull request Feb 27, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
seawinde pushed a commit to seawinde/doris that referenced this pull request Feb 28, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
mymeiyi pushed a commit to mymeiyi/doris that referenced this pull request Mar 4, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
hubgeter added a commit to hubgeter/doris that referenced this pull request Mar 12, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
hubgeter added a commit to hubgeter/doris that referenced this pull request Mar 19, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
@yiguolei yiguolei mentioned this pull request Mar 25, 2025
hubgeter added a commit to hubgeter/doris that referenced this pull request Mar 27, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
csun5285 pushed a commit to csun5285/doris that referenced this pull request Mar 28, 2025
…n prune && timstamp type(apache#44508, apache#48768, apache#48325)  (apache#3805)

pick
apache#44508
apache#48768
apache#48325

---------

Co-authored-by: zhangdong <zhangdong@selectdb.com>
hubgeter added a commit to hubgeter/doris that referenced this pull request Mar 28, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
koarz pushed a commit to koarz/doris that referenced this pull request Jun 4, 2025
…#48325)

### What problem does this PR solve?
Problem Summary:
```sql
create table in  MaxCompute :
CREATE TABLE `mc_parts` (`id` STRING COMMENT 'Id')
PARTITIONED BY (
	`ds` STRING ,
	`audit_flag` STRING );

query in doris :
before:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+

mysql> select * from mc_parts;
ERROR 1105 (HY000): errCode = 2, detailMessage = java.io.IOException: ODPS-0420061: Invalid parameter in HTTP request - The requested columns should be in order with table schema

The reason is because this ds column needs to be before audit_flag, and this order is also required when doing partition pruning ( eg: ds=2024-01-01/audit_flag=Y  ).

after:
mysql> desc mc_parts;
+------------+------+------+------+---------+-------+
| Field      | Type | Null | Key  | Default | Extra |
+------------+------+------+------+---------+-------+
| id         | text | Yes  | true | NULL    |       |
| ds         | text | Yes  | true | NULL    |       |
| audit_flag | text | Yes  | true | NULL    |       |
+------------+------+------+------+---------+-------+
```
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.9-merged dev/3.0.5-merged reviewed usercase Important user case type label

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants