Skip to content

Conversation

@suxiaogang223
Copy link
Contributor

bp:

suxiaogang223 and others added 3 commits August 28, 2025 11:18
add cases

fix

fix

fix

fix

add case for iceberg

fix

fix and flush out

fix

fix again

add case

fix case

msTimeStringToLong

fix case

fix mtmv
@Thearas
Copy link
Contributor

Thearas commented Aug 28, 2025

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?

@suxiaogang223
Copy link
Contributor Author

run buildall

@doris-robot
Copy link

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

------ Round 1 ----------------------------------
q1	17584	5415	5383	5383
q2	2030	392	279	279
q3	12139	1209	736	736
q4	10212	852	453	453
q5	8106	2324	2104	2104
q6	178	161	132	132
q7	863	757	608	608
q8	9332	1393	1089	1089
q9	5190	4971	4879	4879
q10	6746	2247	1855	1855
q11	475	281	272	272
q12	333	352	222	222
q13	17760	3570	2962	2962
q14	242	234	210	210
q15	543	461	459	459
q16	429	415	369	369
q17	582	846	364	364
q18	6924	6307	6350	6307
q19	1199	949	519	519
q20	306	339	206	206
q21	2757	2109	1917	1917
q22	1046	1031	976	976
Total cold run time: 104976 ms
Total hot run time: 32301 ms

----- Round 2, with runtime_filter_mode=off -----
q1	5526	5478	5471	5471
q2	232	324	227	227
q3	2261	2624	2321	2321
q4	1357	1761	1383	1383
q5	4395	4809	4917	4809
q6	166	160	126	126
q7	2040	1958	1819	1819
q8	2555	2806	2667	2667
q9	7380	7269	7327	7269
q10	3029	3334	2858	2858
q11	571	493	484	484
q12	646	749	634	634
q13	3450	3745	3156	3156
q14	296	294	271	271
q15	517	473	470	470
q16	429	487	429	429
q17	1207	1716	1251	1251
q18	7555	7404	7294	7294
q19	749	1056	1078	1056
q20	1989	2067	1888	1888
q21	5281	5029	4638	4638
q22	1098	1068	1018	1018
Total cold run time: 52729 ms
Total hot run time: 51539 ms

@doris-robot
Copy link

TPC-DS: Total hot run time: 192236 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 65f764a2bf1348087043c32af9de619ea89ec874, data reload: false

query1	943	401	423	401
query2	6312	1928	1872	1872
query3	8687	198	195	195
query4	33860	23680	23470	23470
query5	3669	602	471	471
query6	288	203	180	180
query7	4217	517	326	326
query8	318	245	244	244
query9	9234	2613	2594	2594
query10	460	338	260	260
query11	18582	15433	15236	15236
query12	165	109	107	107
query13	1560	559	430	430
query14	9335	6660	6674	6660
query15	246	188	179	179
query16	7991	723	511	511
query17	1549	784	615	615
query18	2119	427	340	340
query19	229	191	187	187
query20	133	125	128	125
query21	206	135	114	114
query22	4545	4657	4359	4359
query23	35298	33965	34445	33965
query24	8278	2685	2706	2685
query25	518	494	435	435
query26	1191	299	172	172
query27	2652	475	355	355
query28	5745	2184	2182	2182
query29	774	592	436	436
query30	240	194	156	156
query31	996	947	817	817
query32	94	58	62	58
query33	505	377	309	309
query34	752	897	536	536
query35	838	794	742	742
query36	1035	1059	977	977
query37	111	101	70	70
query38	4023	4080	4005	4005
query39	1563	1638	1454	1454
query40	209	129	107	107
query41	49	51	48	48
query42	118	107	106	106
query43	501	516	489	489
query44	1372	823	815	815
query45	180	183	174	174
query46	934	1106	694	694
query47	2004	2014	1992	1992
query48	422	440	343	343
query49	779	484	408	408
query50	703	721	428	428
query51	7417	7326	7239	7239
query52	106	102	92	92
query53	246	274	200	200
query54	553	555	486	486
query55	84	82	80	80
query56	281	275	276	275
query57	1336	1299	1246	1246
query58	243	219	231	219
query59	3058	3121	3103	3103
query60	320	277	258	258
query61	118	116	114	114
query62	827	772	709	709
query63	241	203	193	193
query64	4531	1036	686	686
query65	3369	3311	3316	3311
query66	1066	423	305	305
query67	16571	15889	15433	15433
query68	7948	839	542	542
query69	484	315	269	269
query70	1210	1137	1100	1100
query71	388	301	271	271
query72	5151	3991	3722	3722
query73	639	790	351	351
query74	10586	9429	9391	9391
query75	3321	3183	2671	2671
query76	3180	1301	782	782
query77	736	375	276	276
query78	10411	10411	9538	9538
query79	3177	852	600	600
query80	700	517	433	433
query81	495	268	215	215
query82	481	129	91	91
query83	171	168	148	148
query84	288	112	83	83
query85	809	388	312	312
query86	339	309	315	309
query87	4306	4334	4183	4183
query88	5066	2406	2400	2400
query89	419	334	291	291
query90	1857	194	191	191
query91	147	146	112	112
query92	68	58	52	52
query93	2488	898	541	541
query94	681	437	317	317
query95	333	283	276	276
query96	483	670	297	297
query97	3233	3245	3167	3167
query98	233	208	214	208
query99	1560	1428	1314	1314
Total cold run time: 298287 ms
Total hot run time: 192236 ms

@doris-robot
Copy link

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

query1	0.03	0.03	0.03
query2	0.07	0.03	0.03
query3	0.23	0.07	0.06
query4	1.63	0.11	0.10
query5	0.53	0.53	0.54
query6	1.12	0.73	0.72
query7	0.02	0.01	0.02
query8	0.04	0.03	0.04
query9	0.57	0.51	0.49
query10	0.56	0.54	0.56
query11	0.14	0.10	0.10
query12	0.14	0.10	0.11
query13	0.61	0.61	0.60
query14	0.77	0.80	0.79
query15	0.85	0.84	0.83
query16	0.38	0.39	0.39
query17	1.07	1.03	1.07
query18	0.25	0.23	0.23
query19	1.96	1.82	1.79
query20	0.02	0.01	0.01
query21	15.38	0.90	0.59
query22	0.74	0.95	0.54
query23	15.12	1.45	0.64
query24	3.28	0.70	1.44
query25	0.30	0.22	0.17
query26	0.20	0.15	0.14
query27	0.06	0.04	0.04
query28	13.37	1.02	0.43
query29	12.60	3.98	3.26
query30	0.24	0.08	0.06
query31	2.84	0.58	0.39
query32	3.22	0.55	0.46
query33	3.00	3.01	3.03
query34	16.65	5.25	4.54
query35	4.58	4.58	4.58
query36	0.66	0.50	0.48
query37	0.08	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.02	0.03
query40	0.16	0.13	0.13
query41	0.08	0.02	0.02
query42	0.03	0.03	0.02
query43	0.03	0.04	0.03
Total cold run time: 103.69 s
Total hot run time: 28.76 s

@hello-stephen
Copy link
Contributor

FE UT Coverage Report

Increment line coverage 4.48% (3/67) 🎉
Increment coverage report
Complete coverage report

@morrySnow morrySnow changed the title branch-3.1: [fix](paimon) get the correct schema when querying paimon table (#55070 #55364) branch-3.1: [fix](paimon) get the correct schema when querying paimon table #55070 #55364 Aug 28, 2025
@morningman morningman merged commit 6299866 into apache:branch-3.1 Aug 28, 2025
23 checks passed
@suxiaogang223 suxiaogang223 deleted the fix_paimon_schema_3.1 branch September 23, 2025 03:19
morningman pushed a commit that referenced this pull request Sep 23, 2025
…ma Consistency Issues (#56023)

### What problem does this PR solve?

Following PR #55404 which addressed incorrect schema results for Paimon
tables, this PR further optimizes the Paimon time travel implementation
by removing redundant code and fixing the critical issue where schema ID
and snapshot ID were fetched separately, causing consistency problems
and unnecessary I/O overhead.

  #### Key Problem Solved

The core challenge in Paimon time travel is efficiently constructing
tables with specified snapshot ID and schema ID. Previously, these were
fetched separately, causing unnecessary I/O overhead and potential
consistency issues.

  #### Major Improvements

  1. Performance Optimization 

- Unified schema and snapshot retrieval: Combined separate API calls for
schema ID and snapshot ID into a single operation
- Removed redundant metadata fetches: Eliminated duplicate calls to
Paimon metadata store
- Optimized branch schema handling: Streamlined branch-specific schema
resolution

  2. Bug Fixes

- Fixed timezone-related query errors: Resolved incorrect results when
using Paimon time travel syntax with non-UTC timezones
- Fixed branch schema consistency: Ensured snapshot ID and schema ID are
always fetched atomically to prevent mismatched metadata

3. Enhanced Timestamp Format Support for FOR TIME AS OF

  Now supports the following timestamp formats:
- YYYY-MM-DD HH:MM:SS.SSS - Full timestamp with milliseconds (e.g.,
2024-01-15 10:30:45.123)
- YYYY-MM-DD HH:MM:SS - Timestamp with seconds precision (e.g.,
2024-01-15 10:30:45)
- YYYY-MM-DD - Date only format (defaults to 00:00:00.000) (e.g.,
2024-01-15)

  Example usage:
  ```
  -- Using different timestamp formats
  SELECT * FROM paimon_table FOR TIME AS OF "2024-01-15 10:30:45.123";
  SELECT * FROM paimon_table FOR TIME AS OF "2024-01-15 10:30:45";
  SELECT * FROM paimon_table FOR TIME AS OF "2024-01-15";
  ```
github-actions bot pushed a commit that referenced this pull request Sep 23, 2025
…ma Consistency Issues (#56023)

### What problem does this PR solve?

Following PR #55404 which addressed incorrect schema results for Paimon
tables, this PR further optimizes the Paimon time travel implementation
by removing redundant code and fixing the critical issue where schema ID
and snapshot ID were fetched separately, causing consistency problems
and unnecessary I/O overhead.

  #### Key Problem Solved

The core challenge in Paimon time travel is efficiently constructing
tables with specified snapshot ID and schema ID. Previously, these were
fetched separately, causing unnecessary I/O overhead and potential
consistency issues.

  #### Major Improvements

  1. Performance Optimization 

- Unified schema and snapshot retrieval: Combined separate API calls for
schema ID and snapshot ID into a single operation
- Removed redundant metadata fetches: Eliminated duplicate calls to
Paimon metadata store
- Optimized branch schema handling: Streamlined branch-specific schema
resolution

  2. Bug Fixes

- Fixed timezone-related query errors: Resolved incorrect results when
using Paimon time travel syntax with non-UTC timezones
- Fixed branch schema consistency: Ensured snapshot ID and schema ID are
always fetched atomically to prevent mismatched metadata

3. Enhanced Timestamp Format Support for FOR TIME AS OF

  Now supports the following timestamp formats:
- YYYY-MM-DD HH:MM:SS.SSS - Full timestamp with milliseconds (e.g.,
2024-01-15 10:30:45.123)
- YYYY-MM-DD HH:MM:SS - Timestamp with seconds precision (e.g.,
2024-01-15 10:30:45)
- YYYY-MM-DD - Date only format (defaults to 00:00:00.000) (e.g.,
2024-01-15)

  Example usage:
  ```
  -- Using different timestamp formats
  SELECT * FROM paimon_table FOR TIME AS OF "2024-01-15 10:30:45.123";
  SELECT * FROM paimon_table FOR TIME AS OF "2024-01-15 10:30:45";
  SELECT * FROM paimon_table FOR TIME AS OF "2024-01-15";
  ```
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.

6 participants