Skip to content

[fix](iceberg) Preserve timestamp precision and semantics in metadata scans - #68985

Merged
Gabriel39 merged 2 commits into
apache:masterfrom
OIiveirra:fix/jira-doris-29055-master
Oct 15, 2026
Merged

Gabriel39 merged 2 commits into
apache:masterfrom
OIiveirra:fix/jira-doris-29055-master

Conversation

@OIiveirra

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: N/A

Related PR: #68276 (supersedes its metadata-scanner fix; this PR targets master)

Problem Summary:

Iceberg metadata table timestamps are encoded as epoch microseconds. The JNI scanner converts them through milliseconds, losing fractional precision. It also applies the session time zone to timestamp-without-zone partition values, changing their wall-clock value.

For example, a $files.partition timestamp of 1234567 microseconds is truncated to 1970-01-01 00:00:01.234000 rather than 1970-01-01 00:00:01.234567. Switching from UTC to Asia/Shanghai incorrectly shifts timestamp-without-zone values by eight hours.

This PR:

  • Decodes signed epoch microseconds with floor division/modulus, preserving pre-epoch fractions.
  • Propagates Iceberg types through struct/list/map values to distinguish wall-clock timestamps from instants.
  • Resolves requested field types by name while continuing to read projected rows by position.
  • Adds unit tests and a $files.partition regression covering -1000001, -1, 1, 999, 1000, 1234567, and NULL, UTC/Asia/Shanghai, both timestamp mapping settings, and a projected partition child.

Scope is the Java Iceberg metadata scanner. This PR does not modify regular data-table timestamp reads or the FE/native $position_deletes serialization path. There are no storage-format or configuration changes.

Release note

Fix microsecond precision loss and incorrect session-time-zone shifts for timestamp-without-zone values in Iceberg metadata tables.

Check List (For Author)

  • Test

    • Regression test
      • test_iceberg_files_timestamp_partition: generated the golden output, checked its timestamp values, and reran normal comparison successfully (1 suite, 0 failures/skips).
      • test_iceberg_system_table_projection: passed.
      • test_iceberg_position_deletes_sys_table: passed.
    • Unit Test
      • IcebergSysTableColumnValueTest: 2 tests passed; the FE/Java-extension reactor completed successfully.
    • 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

    Local External tests used an isolated Iceberg fixture stack and the newly packaged metadata-scanner plugin deployed to the personal Doris BE. The full FE/BE deployment build was interrupted during C++ submodule downloads; FE/BE executables were not rebuilt for these runs. These are targeted local results, not full community External/P0/coverage results.

  • Behavior changed:

    • No.
    • Yes. Metadata timestamps retain microseconds; timestamp-without-zone values no longer shift with the session time zone. Timestamp-with-zone values preserve their instant semantics.
  • 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

… scans

### What problem does this PR solve?

Related PR: apache#68276

Problem Summary: Iceberg files metadata partition timestamps lose microseconds through millisecond conversion, and timestamp-without-zone values incorrectly follow the session timezone. Decode signed epoch microseconds with floor division and propagate Iceberg types through nested metadata values while retaining projected row ordering.

### Release note

Preserve microsecond precision and timestamp-without-zone wall-clock values in Iceberg metadata table output.

### Check List (For Author)

- Test: Focused Java unit tests (2 passed); external system table projection and position deletes suites passed; files timestamp partition regression generated and verified against golden output (1 suite passed).
- Behavior changed: Yes; correct timestamp precision and timestamp-without-zone timezone handling.
- Does this need documentation: No
Copilot AI balanced review requested due to automatic review settings October 13, 2026 02:03
@hello-stephen

Copy link
Copy Markdown
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?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@OIiveirra

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17573	5593	5505	5505
q2	2090	307	282	282
q3	10242	1359	822	822
q4	4674	470	359	359
q5	7437	780	525	525
q6	181	180	153	153
q7	772	797	611	611
q8	9236	1236	1101	1101
q9	5844	4438	4486	4438
q10	6820	1297	1036	1036
q11	433	254	230	230
q12	632	403	287	287
q13	18042	3040	2407	2407
q14	277	273	251	251
q15	q16	728	718	659	659
q17	1165	748	569	569
q18	7027	6198	6137	6137
q19	1100	956	610	610
q20	382	348	224	224
q21	4694	2255	2394	2255
q22	354	312	268	268
Total cold run time: 99703 ms
Total hot run time: 28729 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	6125	6120	6100	6100
q2	675	565	559	559
q3	5229	5383	4948	4948
q4	1985	2120	1529	1529
q5	5228	5156	5664	5156
q6	247	190	146	146
q7	2344	2063	1878	1878
q8	3120	2662	2795	2662
q9	8248	8132	8186	8132
q10	3727	3973	3333	3333
q11	686	434	419	419
q12	678	742	519	519
q13	2862	3317	2537	2537
q14	300	302	289	289
q15	q16	709	713	659	659
q17	8393	7532	7343	7343
q18	13208	12389	13138	12389
q19	971	799	794	794
q20	2183	2175	1949	1949
q21	5714	4679	4755	4679
q22	507	447	410	410
Total cold run time: 73139 ms
Total hot run time: 66430 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 151929 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 001649d4304d134969ef680729acef810e387dc9, data reload: false

query5	4299	582	459	459
query6	417	200	192	192
query7	4810	447	225	225
query8	320	178	180	178
query9	8782	4052	4022	4022
query10	474	320	254	254
query11	5962	3402	3186	3186
query12	146	86	81	81
query13	1245	445	333	333
query14	6558	4807	4509	4509
query14_1	4214	4289	4291	4289
query15	212	196	178	178
query16	942	452	420	420
query17	870	661	549	549
query18	2427	425	318	318
query19	194	166	156	156
query20	80	79	80	79
query21	212	138	114	114
query22	13015	13123	12871	12871
query23	13101	12554	12060	12060
query23_1	12213	12238	12207	12207
query24	7094	833	467	467
query24_1	476	486	474	474
query25	538	423	387	387
query26	1256	257	141	141
query27	2759	439	273	273
query28	4594	1969	2007	1969
query29	1566	594	456	456
query30	303	214	191	191
query31	886	759	651	651
query32	141	97	90	90
query33	511	313	247	247
query34	876	856	508	508
query35	755	747	647	647
query36	834	777	701	701
query37	124	103	92	92
query38	1801	1765	1686	1686
query39	706	706	692	692
query39_1	667	676	644	644
query40	219	117	99	99
query41	71	70	71	70
query42	89	84	83	83
query43	372	379	325	325
query44	1336	708	713	708
query45	180	177	169	169
query46	870	967	571	571
query47	2977	2877	2932	2877
query48	303	318	219	219
query49	602	390	322	322
query50	689	279	210	210
query51	10537	10167	10445	10167
query52	78	86	68	68
query53	190	205	152	152
query54	234	187	185	185
query55	72	66	62	62
query56	236	216	215	215
query57	1614	1570	1540	1540
query58	282	255	244	244
query59	2360	2359	2126	2126
query60	274	233	217	217
query61	145	150	148	148
query62	391	342	283	283
query63	193	162	165	162
query64	2752	940	781	781
query65	3480	3390	3398	3390
query66	1782	436	307	307
query67	20288	20195	19917	19917
query68	2939	1008	629	629
query69	385	292	236	236
query70	947	878	813	813
query71	295	225	204	204
query72	2690	2498	2257	2257
query73	515	531	303	303
query74	4632	4485	4295	4295
query75	2329	2309	1932	1932
query76	2284	1025	625	625
query77	363	405	302	302
query78	9085	9059	8539	8539
query79	1008	861	520	520
query80	785	438	336	336
query81	551	315	276	276
query82	580	148	109	109
query83	304	209	172	172
query84	310	123	99	99
query85	950	423	363	363
query86	346	233	228	228
query87	2015	1954	1821	1821
query88	3701	2736	2714	2714
query89	348	303	259	259
query90	1732	181	183	181
query91	161	148	122	122
query92	95	86	86	86
query93	1028	1000	565	565
query94	495	314	298	298
query95	592	410	322	322
query96	679	525	235	235
query97	2459	2417	2308	2308
query98	156	147	142	142
query99	785	774	654	654
Total cold run time: 234249 ms
Total hot run time: 151929 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.71 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 001649d4304d134969ef680729acef810e387dc9, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.04	0.06
query3	0.26	0.12	0.12
query4	1.61	0.13	0.12
query5	0.26	0.25	0.24
query6	1.17	0.69	0.69
query7	0.04	0.00	0.00
query8	0.06	0.04	0.04
query9	0.42	0.35	0.36
query10	0.62	0.56	0.61
query11	0.21	0.14	0.14
query12	0.17	0.15	0.16
query13	0.50	0.50	0.48
query14	0.96	0.96	0.94
query15	0.63	0.62	0.60
query16	0.34	0.35	0.35
query17	1.15	1.16	1.21
query18	0.23	0.21	0.21
query19	2.09	2.01	1.92
query20	0.02	0.01	0.02
query21	15.41	0.28	0.14
query22	4.41	0.06	0.05
query23	16.25	0.33	0.13
query24	3.13	0.99	0.41
query25	0.13	0.05	0.05
query26	1.77	0.25	0.16
query27	0.05	0.05	0.04
query28	2.17	0.57	0.42
query29	12.48	4.30	3.34
query30	0.29	0.14	0.13
query31	2.78	0.58	0.34
query32	3.26	0.62	0.51
query33	3.25	3.24	3.25
query34	15.55	4.04	3.47
query35	3.35	3.34	3.36
query36	0.54	0.49	0.44
query37	0.10	0.07	0.06
query38	0.05	0.04	0.04
query39	0.03	0.03	0.03
query40	0.17	0.15	0.15
query41	0.09	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.03	0.03
Total cold run time: 96.19 s
Total hot run time: 24.71 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/969) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage `` 🎉
Increment coverage report
Complete coverage report

### What problem does this PR solve?

Related PR: apache#68985

Problem Summary: External regression build 1067800 failed test_iceberg_write_stats2 because its readable_metrics golden output still expected timestamp-without-zone bounds shifted by eight hours. Regenerate the Parquet and ORC expectations using the corrected metadata scanner. Only the timestamp lower and upper bounds change.

### Release note

None

### Check List (For Author)

- Test: Regression test; test_iceberg_write_stats2 passed normal golden comparison (1 suite, 0 failures, 0 skips), using the deployed PR scanner plugin and personal Iceberg profile.
- Behavior changed: No; align test expectations with the timestamp semantics fixed in this PR.
- Does this need documentation: No
@OIiveirra

Copy link
Copy Markdown
Collaborator Author

run buildall

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17596	5626	5513	5513
q2	2100	307	263	263
q3	10246	1403	856	856
q4	4683	479	358	358
q5	7437	803	559	559
q6	187	194	159	159
q7	784	836	598	598
q8	9243	1342	1152	1152
q9	5768	4449	4423	4423
q10	6816	1300	1027	1027
q11	440	254	239	239
q12	636	400	295	295
q13	18074	3065	2377	2377
q14	275	265	243	243
q15	q16	722	726	660	660
q17	1179	747	588	588
q18	7113	6254	6201	6201
q19	1120	967	610	610
q20	383	338	221	221
q21	5358	2556	2649	2556
q22	396	360	324	324
Total cold run time: 100556 ms
Total hot run time: 29222 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	6556	6614	6850	6614
q2	763	620	562	562
q3	5506	5704	5212	5212
q4	2089	2157	1612	1612
q5	5843	5682	5789	5682
q6	240	194	148	148
q7	2193	2033	1823	1823
q8	3213	2832	2771	2771
q9	8300	8182	8145	8145
q10	3634	3592	3241	3241
q11	589	407	375	375
q12	677	690	503	503
q13	2743	3059	2380	2380
q14	280	282	273	273
q15	q16	652	688	608	608
q17	7820	6963	6907	6907
q18	13121	12289	13114	12289
q19	913	803	784	784
q20	2194	2168	1948	1948
q21	5776	4734	4796	4734
q22	510	445	415	415
Total cold run time: 73612 ms
Total hot run time: 67026 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 151947 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 791e9298078c9ef95d7ffe2d459d418ffd5403ae, data reload: false

query5	4313	573	447	447
query6	424	209	211	209
query7	4796	459	224	224
query8	317	190	172	172
query9	8751	4028	3964	3964
query10	468	315	269	269
query11	5893	3433	3186	3186
query12	148	89	82	82
query13	1238	432	319	319
query14	6569	4750	4498	4498
query14_1	4251	4275	4258	4258
query15	209	207	181	181
query16	929	422	450	422
query17	856	657	530	530
query18	2420	422	322	322
query19	196	168	139	139
query20	83	84	80	80
query21	217	136	114	114
query22	12895	13026	12734	12734
query23	13154	12738	12272	12272
query23_1	12289	12278	12237	12237
query24	7112	836	468	468
query24_1	478	480	487	480
query25	536	427	372	372
query26	1262	259	143	143
query27	2763	442	276	276
query28	4624	1986	1937	1937
query29	1574	600	463	463
query30	296	225	188	188
query31	920	767	658	658
query32	146	100	91	91
query33	548	297	240	240
query34	985	848	503	503
query35	760	738	643	643
query36	811	830	752	752
query37	132	98	91	91
query38	1793	1755	1709	1709
query39	714	696	694	694
query39_1	654	660	676	660
query40	213	109	94	94
query41	65	69	61	61
query42	88	80	81	80
query43	362	375	333	333
query44	1327	714	698	698
query45	180	173	165	165
query46	838	957	586	586
query47	2941	2783	2895	2783
query48	295	300	219	219
query49	572	389	291	291
query50	685	272	216	216
query51	10608	10312	10248	10248
query52	81	81	77	77
query53	187	206	149	149
query54	231	197	192	192
query55	74	66	63	63
query56	231	211	218	211
query57	1588	1558	1523	1523
query58	277	254	240	240
query59	2337	2375	2124	2124
query60	282	241	221	221
query61	151	153	175	153
query62	386	340	284	284
query63	201	162	167	162
query64	2715	938	768	768
query65	3431	3359	3347	3347
query66	1795	419	315	315
query67	19848	20202	20045	20045
query68	2908	983	630	630
query69	383	293	246	246
query70	908	838	831	831
query71	301	235	208	208
query72	2629	2565	2270	2270
query73	513	527	295	295
query74	4589	4458	4312	4312
query75	2312	2277	1947	1947
query76	2307	1016	612	612
query77	348	415	303	303
query78	8896	8971	8464	8464
query79	839	886	514	514
query80	483	412	342	342
query81	526	324	272	272
query82	210	137	110	110
query83	222	193	177	177
query84	305	128	99	99
query85	778	417	360	360
query86	260	244	227	227
query87	1989	1970	1813	1813
query88	3626	2756	2718	2718
query89	336	299	257	257
query90	2137	183	170	170
query91	157	157	127	127
query92	95	88	91	88
query93	979	972	568	568
query94	459	306	284	284
query95	601	409	317	317
query96	683	517	237	237
query97	2450	2419	2321	2321
query98	158	153	148	148
query99	780	776	652	652
Total cold run time: 232392 ms
Total hot run time: 151947 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 24.51 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 791e9298078c9ef95d7ffe2d459d418ffd5403ae, data reload: false

query1	0.00	0.00	0.01
query2	0.10	0.06	0.05
query3	0.26	0.12	0.11
query4	1.61	0.13	0.12
query5	0.27	0.25	0.25
query6	1.18	0.69	0.67
query7	0.04	0.01	0.00
query8	0.06	0.03	0.03
query9	0.42	0.35	0.35
query10	0.58	0.57	0.56
query11	0.21	0.14	0.14
query12	0.18	0.14	0.14
query13	0.49	0.51	0.49
query14	0.98	0.96	0.95
query15	0.63	0.60	0.60
query16	0.33	0.31	0.35
query17	1.14	1.14	1.14
query18	0.22	0.22	0.21
query19	2.16	2.02	2.04
query20	0.01	0.01	0.01
query21	15.42	0.28	0.14
query22	4.34	0.05	0.06
query23	16.27	0.32	0.12
query24	3.16	0.53	0.45
query25	0.13	0.06	0.06
query26	1.17	0.24	0.15
query27	0.06	0.05	0.04
query28	2.19	0.62	0.39
query29	12.49	4.16	3.31
query30	0.28	0.14	0.13
query31	2.78	0.57	0.35
query32	3.22	0.62	0.52
query33	3.24	3.17	3.22
query34	15.52	4.04	3.35
query35	3.32	3.35	3.35
query36	0.54	0.47	0.42
query37	0.10	0.06	0.06
query38	0.05	0.04	0.04
query39	0.03	0.04	0.03
query40	0.18	0.15	0.15
query41	0.09	0.03	0.03
query42	0.03	0.02	0.03
query43	0.04	0.04	0.03
Total cold run time: 95.52 s
Total hot run time: 24.51 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 0.00% (0/264) 🎉
Increment coverage report
Complete coverage report

@linrrzqqq

Copy link
Copy Markdown
Collaborator

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Static review of all six changed files at 791e9298078c9ef95d7ffe2d459d418ffd5403ae found no substantiated new defect. No existing inline finding or additional user focus was supplied; a live inline-comment read also found none.

The reviewed path is SQL metadata-table projection -> ordered Iceberg task -> JNI positional row access plus logical type lookup -> nested ColumnValue wrappers -> DATETIME/TIMESTAMPTZ vector packing. Signed floor division/modulus preserves negative and positive microsecond fractions. NTZ reconstruction preserves wall-clock fields; instant timestamps retain UTC storage and session-zone presentation.

Required checkpoint Conclusion
Goal and proof The implementation addresses precision loss and NTZ zone shifts. Two new helper unit tests and the identity-partition regression cover the intended values; this review did not execute them.
Scope and clarity Two production Java classes, matching unit/regression tests and timestamp goldens; shared timestamp arithmetic avoids duplication.
Concurrency and locks No new thread, lock or shared mutable state; the final Type array is scanner-local.
Lifecycle and static initialization No new resource ownership or static initializer. Existing iterator cleanup and vector-table release-on-exception remain in use.
Configuration and dynamic changes No configuration added; existing session zone is passed through. The tested mapping property is a legacy option at this head, so its two settings correctly produce identical results.
API, storage and rolling compatibility Old constructors remain; no plugin SPI, serialized task shape or storage-format change. Existing Iceberg serialization compatibility is untouched.
Thrift/protobuf ids No changed definitions; cross-branch field-id audit is not applicable.
Parallel paths Both BE JNI reader generations share this scanner. Regular Iceberg data and native position-delete readers use separate conversions and are outside the stated fix.
Special conditions and errors TimestampType/shouldAdjustToUTC selects wall-clock versus instant semantics; null-Type overloads preserve legacy behavior. Missing schema fields fail explicitly, and vector appends check nulls before getters.
Test coverage and negative cases Signed pre-epoch/submillisecond values, UTC/Shanghai, NTZ/TZ, reversed struct indexes, arrays, map keys/values and a null partition are covered by checked-in cases. Full partition and selected child expressions are exercised.
All changed expected results All eight new golden blocks (56 rows) match independent static arithmetic; both changed write-stat bounds match their unchanged little-endian raw microsecond bounds and inserted DATETIME literals. Result sorting makes random file names irrelevant.
Observability Pure decoding adds no new distributed operation; existing field-name exceptions, JNI error propagation and query-profile timing are adequate.
Transactions, persistence and failover No transaction, EditLog, version-visibility, snapshot-selection or delete-bitmap change.
Writes, atomicity and crashes Production changes only decode metadata reads; existing exception cleanup remains intact. Test fixture writes use the existing Spark helper.
FE-BE variable passing No new wire variable; Type metadata comes from the existing serialized task.
Performance and memory Schema/name lookup is cached and performed at scanner construction, not per row; arithmetic and child-type lookup are bounded. No material new buffers, remote IO or tracked native ownership. Iceberg schema cache.
Other issues and user concerns All changed-file scope was inspected, with separate implementation, test and risk reviewers. No extra user focus, verified candidate or duplicate blocking finding.

Risk analysis checked both full-schema StaticDataTask and projected ManifestReadTask layouts, nested ordinal/type pairing, readable-metrics bounds, name casing and evolved partition schemas. FE keeps full nested metadata fields and disables physical nested pruning for Iceberg metadata readers; the child regression tests expression projection. The SDK converts metadata-family millisecond times to microseconds before row decoding. Static task projection, snapshot timestamp rows.

Validation limits: static analysis only, as required. No build, test, cluster run or source modification was performed; checked-in goldens and author-reported runs do not independently prove execution or generation provenance. Added tests do not directly exercise every metadata-table family, physically pruned later children (disabled by current metadata-reader contract), DST/historical-offset zones, empty multi-level containers or invalid field/zone diagnostics. These are validation limits with no concrete incorrect supported behavior identified; they are not unresolved findings.

Convergence: true, after 1 review round. Implementation, test and dedicated risk reviewers all returned NO_NEW_VALUABLE_FINDINGS; main independently verified their evidence, completed the full-scope final sweep and closed both initial risks. No unresolved candidate or changed-file coverage gap remains. New inline findings: 0. Confirmed existing blocking findings: 0.

Review converged after 1 round(s).

@Gabriel39
Gabriel39 merged commit d3772cb into apache:master Oct 15, 2026
36 checks passed
Gabriel39 added a commit that referenced this pull request Oct 19, 2026
…69171)

## Problem and behavior

`branch-4.2` is missing several external type mapping fixes already
merged into master. This adapted backport aligns these paths while
retaining the branch's existing VARBINARY and TIMESTAMPTZ support:

| Path | Result | Upstream |
| --- | --- | --- |
| Parquet/ORC file TVFs | Unannotated binary fields infer VARBINARY with
the legacy option absent, false, or true, including nested fields |
#68786 |
| Oracle JDBC | BINARY_FLOAT maps to FLOAT; BINARY_DOUBLE maps to DOUBLE
| #68200 |
| SQL Server JDBC | Resolve user-defined aliases by JDBC type code;
strip IDENTITY decoration only when the base type agrees with that code
| #67916 |
| Iceberg metadata scanner | Preserve signed epoch microseconds and
timestamp-without-zone wall-clock values through nested structs, arrays,
and maps | #68985 |

Logical UUID annotations retain their existing file-format semantics
instead of being overridden by the raw-binary default. Parquet schema
discovery retains canonical STRING values and ORC retains native UUID
values. Modern and legacy Parquet ENUM annotations remain STRING. Full
external native UUID alignment and nanosecond timestamp support in
#69163 remain separate. Golden results in this PR target its own
branch-4.2 build and do not assume those reader changes have landed. The
Iceberg scanner keeps this branch's full-schema source indexes rather
than copying master's projected-row indexing. The master JDBC scanner
architecture remains outside this backport. Oracle connections enable
binary IEEE floating-point bindings so valid BINARY_DOUBLE values
outside NUMBER’s range can be written without overflow.

Binary TVF columns display hexadecimal values. Direct CTAS into an
internal VARBINARY column is rejected, consistently with master. The
CTAS partitioning/distribution suite explicitly decodes its UTF-8 binary
fixture into STRING; the dedicated binary suite checks rejection of
direct VARBINARY CTAS and byte-preserving HEX materialization. Paimon
raw-file TVF expectations now preserve binary bytes even without the
obsolete mapping option. Variant shredding assertions likewise require
binary metadata and residual values while preserving all physical-layout
and logical round-trip checks.

## Validation

- Reproduced the Oracle failure against a real Oracle database: the old
executor throws `IllegalArgumentException: Overflow` from
`setDouble(1e200)`; the fixed executor preserves large/small doubles,
floats, and NULLs through INSERT/readback.
- Added shared-schema coverage for modern/legacy ENUM annotations and
UUID precedence, plus an ENUM-only CTAS regression with both legacy
option values.
- Updated scalar/nested UUID regression coverage so a raw-binary default
cannot override logical UUID annotations.

- Built FE and the full ASAN BE from this PR worktree. FE Checkstyle and
clang-format 16 passed.
- Five Oracle Java tests passed against a real Oracle database,
including the optional INSERT/readback integration test; the new Doris
JDBC regression block also passed.
- Two focused production-library-linked Parquet schema tests passed; the
new logical-annotation test failed against the previous implementation
as expected. All four modified BE test translation units passed
compilation checks.
- All seven UUID regression suites and the complete HDFS Parquet group 6
suite passed actual generation followed by independent comparison runs,
with zero skipped suites. Updated golden blocks were taken from those
executions.

The previous coverage build stopped while downloading Maven (`wget` exit
4), before project compilation. This is an infrastructure failure and is
retriggered with the updated source. Muted unrelated compaction/cache/S3
timeout cases are not changed here.
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.

5 participants