Skip to content

[fix](iceberg) Fix MVCC and nested schema evolution edge cases - #66345

Open
Gabriel39 wants to merge 7 commits into
apache:masterfrom
Gabriel39:fix/pr-66007-review-followups
Open

[fix](iceberg) Fix MVCC and nested schema evolution edge cases#66345
Gabriel39 wants to merge 7 commits into
apache:masterfrom
Gabriel39:fix/pr-66007-review-followups

Conversation

@Gabriel39

@Gabriel39 Gabriel39 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

This PR fixes correctness and memory-usage edge cases in Iceberg MVCC writes and nested schema evolution:

  • An explicitly empty read could be reinterpreted as the latest snapshot after a concurrent first append. A MERGE could then miss the concurrent row and silently insert a duplicate.
  • Write-schema validation used the INSERT column subset instead of the complete bind-time target schema, rejecting valid partial and static-partition INSERTs while weakening ordinal drift checks.
  • Iceberg v3 row-lineage metadata columns could be mistaken for user-schema drift.
  • Parent null-mask handling for nested ARRAY/MAP values could scan descendant entry maps and allocate entry-sized scratch even when the inherited mask was absent or all-clear.
  • Strict cast failure semantics were incorrectly used to mark a struct field physically non-nullable even though BE narrowing casts still return ColumnNullable.
  • Nested DESCRIBE comments were not emitted as round-trippable SQL literals.

The fix preserves the explicit empty-snapshot marker through scan planning and keeps RowDelta conflict validation anchored at table creation. In the concurrent empty-table MERGE/INSERT window, MERGE keeps reading the original empty view and its commit conflicts with the concurrent first append instead of producing duplicate data.

Write planning now carries an immutable complete target-schema snapshot separately from the write subset, validates column order, type, and Iceberg field id, and excludes engine-generated row-lineage metadata from the user-schema comparison. Nested collection alignment gates descendant scans on an inherited mask that can actually hide a row, and struct constructors preserve the physical nullability of cast results.

Release note

Fix Iceberg empty-snapshot concurrency, partial-write schema validation, nested collection memory usage, cast-result nullability, and nested DESCRIBE comment rendering.

Check List (For Author)

  • Test
    • Regression tests
    • Unit tests
  • Behavior changed:
    • Yes. Correctness and memory-usage fixes for the affected edge cases.
  • Does this need documentation?
    • No.

Tests

  • Iceberg write-plan tests: 50 passed
  • Iceberg concurrent empty-snapshot barrier test: passed
  • BE TableReaderTest: 95 passed
  • FE connector sink, binding, executor, and struct tests: 38 passed
  • FE Checkstyle: 0 violations
  • Clang Formatter 16: passed
  • git diff --check: passed

### What problem does this PR solve?

Issue Number: close #xxx

Related PR: apache#66007

Problem Summary:

Several review follow-ups from apache#66007 remained open: empty Iceberg reads could lose their MVCC boundary before a concurrent first append; nested DESCRIBE comments were not emitted as valid SQL literals; strict pre-casts widened required struct fields to nullable; trivial collection children lost inherited parent masks; and connector sink binding repeatedly loaded the latest target schema.

This change preserves the empty-read marker through Iceberg write planning, centralizes SQL string literal quoting, makes cast nullability strict-mode aware, projects inherited collection masks through ARRAY/MAP offsets, and captures one case-insensitive connector target-schema snapshot per bind.

### Release note

Fix Iceberg MVCC and nested schema-evolution edge cases in connector reads, writes, DESCRIBE output, casts, and sink binding.

### Check List (For Author)

- Test
  - [x] Regression tests
  - [x] Unit tests
- Behavior changed:
  - [x] Yes. Correctness fixes for the affected edge cases.
- Does this need documentation?
  - [x] No.
@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?

@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17815	4019	3955	3955
q2	2052	341	214	214
q3	10253	1422	804	804
q4	4677	466	334	334
q5	7495	820	581	581
q6	181	167	134	134
q7	740	775	608	608
q8	9327	1604	1522	1522
q9	5335	4054	4043	4043
q10	6712	1635	1352	1352
q11	506	366	332	332
q12	732	565	464	464
q13	18072	3314	2755	2755
q14	272	263	241	241
q15	q16	738	727	670	670
q17	962	998	1073	998
q18	6899	5789	5460	5460
q19	1303	1186	1078	1078
q20	824	657	610	610
q21	6513	2737	2738	2737
q22	471	377	320	320
Total cold run time: 101879 ms
Total hot run time: 29212 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4970	4789	4703	4703
q2	280	323	204	204
q3	4928	5265	4703	4703
q4	2247	2240	1421	1421
q5	4768	4439	4607	4439
q6	230	170	125	125
q7	1823	1690	1511	1511
q8	2357	1997	1978	1978
q9	7094	6724	6700	6700
q10	4234	4212	3829	3829
q11	502	368	341	341
q12	685	714	489	489
q13	2998	3268	2751	2751
q14	271	277	254	254
q15	q16	670	681	608	608
q17	1265	1227	1232	1227
q18	7066	6777	6708	6708
q19	1049	1061	1059	1059
q20	2209	2198	1916	1916
q21	5268	4572	4426	4426
q22	519	463	409	409
Total cold run time: 55433 ms
Total hot run time: 49801 ms

@hello-stephen

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

query5	4358	607	475	475
query6	470	229	219	219
query7	4846	575	352	352
query8	341	188	163	163
query9	8777	4057	4096	4057
query10	452	351	295	295
query11	5797	2223	2022	2022
query12	152	98	97	97
query13	1301	591	412	412
query14	6147	4668	4361	4361
query14_1	3807	3798	3756	3756
query15	221	199	173	173
query16	1008	479	436	436
query17	1099	687	530	530
query18	2443	451	353	353
query19	201	182	144	144
query20	105	99	98	98
query21	232	155	139	139
query22	13057	13048	12898	12898
query23	17236	16398	15968	15968
query23_1	16102	16144	16137	16137
query24	7526	1696	1247	1247
query24_1	1249	1237	1203	1203
query25	527	440	377	377
query26	1324	351	215	215
query27	2658	605	404	404
query28	4536	1995	2053	1995
query29	1059	596	455	455
query30	341	265	226	226
query31	1124	1082	951	951
query32	108	64	62	62
query33	532	325	256	256
query34	1155	1114	636	636
query35	739	756	654	654
query36	787	799	717	717
query37	152	105	92	92
query38	1840	1651	1604	1604
query39	816	840	800	800
query39_1	785	780	788	780
query40	262	169	157	157
query41	71	68	72	68
query42	95	96	97	96
query43	319	317	275	275
query44	1393	790	771	771
query45	187	182	172	172
query46	1067	1207	724	724
query47	1526	1527	1429	1429
query48	407	406	323	323
query49	585	432	309	309
query50	1100	442	346	346
query51	10540	10657	10629	10629
query52	89	89	76	76
query53	273	277	207	207
query54	307	249	232	232
query55	77	77	68	68
query56	325	309	307	307
query57	1043	994	922	922
query58	296	284	263	263
query59	1574	1594	1367	1367
query60	322	278	266	266
query61	179	178	177	177
query62	402	326	269	269
query63	242	205	199	199
query64	2955	1203	860	860
query65	3930	3845	3833	3833
query66	1840	468	368	368
query67	28397	28180	28060	28060
query68	3224	1527	946	946
query69	400	287	253	253
query70	905	811	787	787
query71	379	353	318	318
query72	3027	2661	2226	2226
query73	837	764	435	435
query74	4641	4626	4350	4350
query75	2371	2362	1979	1979
query76	2306	1153	755	755
query77	338	368	270	270
query78	11187	11095	10582	10582
query79	1378	1159	744	744
query80	1256	559	471	471
query81	544	328	291	291
query82	594	153	118	118
query83	365	321	291	291
query84	271	165	125	125
query85	971	599	516	516
query86	407	233	218	218
query87	1799	1793	1693	1693
query88	3740	2816	2806	2806
query89	394	311	283	283
query90	1934	211	196	196
query91	213	192	164	164
query92	62	58	53	53
query93	1685	1556	1012	1012
query94	713	354	311	311
query95	807	590	487	487
query96	1052	812	351	351
query97	2494	2472	2333	2333
query98	212	193	186	186
query99	718	730	615	615
Total cold run time: 256718 ms
Total hot run time: 169738 ms

@hello-stephen

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

query1	0.00	0.00	0.00
query2	0.10	0.05	0.05
query3	0.26	0.13	0.14
query4	1.62	0.14	0.14
query5	0.24	0.22	0.22
query6	1.16	0.82	0.82
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.38	0.31	0.31
query10	0.55	0.55	0.53
query11	0.19	0.14	0.14
query12	0.18	0.15	0.14
query13	0.46	0.46	0.47
query14	1.01	0.99	0.99
query15	0.61	0.58	0.58
query16	0.31	0.32	0.31
query17	1.06	1.10	1.10
query18	0.21	0.20	0.20
query19	2.03	1.89	1.93
query20	0.02	0.01	0.01
query21	15.44	0.19	0.13
query22	4.98	0.05	0.05
query23	16.13	0.31	0.12
query24	2.95	0.41	0.33
query25	0.10	0.06	0.04
query26	0.73	0.22	0.15
query27	0.05	0.04	0.03
query28	3.60	0.78	0.37
query29	12.47	4.01	3.18
query30	0.26	0.15	0.15
query31	2.77	0.58	0.31
query32	3.22	0.58	0.48
query33	3.18	3.30	3.16
query34	15.59	3.96	3.29
query35	3.24	3.23	3.25
query36	0.55	0.46	0.42
query37	0.09	0.06	0.06
query38	0.05	0.04	0.03
query39	0.03	0.03	0.03
query40	0.17	0.15	0.14
query41	0.09	0.04	0.04
query42	0.03	0.02	0.02
query43	0.04	0.03	0.03
Total cold run time: 96.25 s
Total hot run time: 23.86 s

Keep an explicitly empty MVCC read empty across a concurrent first append and validate RowDelta conflicts from table creation. Add a barrier test for the MERGE/INSERT race.

Also fail writes when the bound schema changed, avoid unnecessary nested collection null-mask allocation, and keep Cast nullability independent of thread-local strict mode.
@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Codex completed, but no new pull request review was submitted for the current head SHA.
Workflow run: https://github.com/apache/doris/actions/runs/30683578831

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17634	3894	3896	3894
q2	1990	311	201	201
q3	10367	1334	818	818
q4	4683	464	341	341
q5	7557	830	548	548
q6	194	167	133	133
q7	736	793	594	594
q8	10100	1490	1521	1490
q9	5856	4076	3995	3995
q10	6854	1633	1366	1366
q11	516	359	320	320
q12	737	573	445	445
q13	18086	3236	2714	2714
q14	252	251	241	241
q15	q16	728	738	654	654
q17	992	887	937	887
q18	6816	5734	5560	5560
q19	1361	1203	1070	1070
q20	781	669	579	579
q21	5797	2590	2439	2439
q22	442	355	308	308
Total cold run time: 102479 ms
Total hot run time: 28597 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4232	4132	4135	4132
q2	282	311	208	208
q3	4487	4900	4417	4417
q4	2126	2236	1395	1395
q5	4211	4122	4054	4054
q6	223	173	124	124
q7	1666	1560	1407	1407
q8	2745	2051	2020	2020
q9	7219	7185	7211	7185
q10	4290	4248	3843	3843
q11	547	406	356	356
q12	703	715	500	500
q13	3228	3442	3005	3005
q14	294	303	265	265
q15	q16	696	711	614	614
q17	1306	1300	1271	1271
q18	7951	7191	7133	7133
q19	1080	1054	1006	1006
q20	2165	2169	1891	1891
q21	5206	4532	4389	4389
q22	530	432	405	405
Total cold run time: 55187 ms
Total hot run time: 49620 ms

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Codex completed, but no new pull request review was submitted for the current head SHA.
Workflow run: https://github.com/apache/doris/actions/runs/30684910352

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 168981 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 4576ae63e6f1b751ff9f3af374ff1caf38bd8237, data reload: false

query5	4312	604	466	466
query6	472	223	206	206
query7	4885	554	343	343
query8	337	186	179	179
query9	8785	4039	4011	4011
query10	507	370	317	317
query11	5817	2205	2068	2068
query12	162	101	98	98
query13	1269	571	433	433
query14	6164	4692	4369	4369
query14_1	3828	3808	3778	3778
query15	206	192	173	173
query16	1002	451	439	439
query17	910	671	522	522
query18	2428	469	328	328
query19	199	185	145	145
query20	103	98	99	98
query21	243	158	136	136
query22	13060	13000	12757	12757
query23	17295	16339	16053	16053
query23_1	16166	16293	16335	16293
query24	7625	1672	1245	1245
query24_1	1247	1270	1185	1185
query25	522	425	348	348
query26	1341	338	212	212
query27	2596	605	373	373
query28	4490	2044	2007	2007
query29	1047	571	458	458
query30	345	260	229	229
query31	1113	1058	949	949
query32	106	61	58	58
query33	516	315	244	244
query34	1176	1156	644	644
query35	722	742	647	647
query36	771	775	681	681
query37	149	103	89	89
query38	1833	1645	1573	1573
query39	814	825	787	787
query39_1	804	778	785	778
query40	264	165	142	142
query41	64	65	64	64
query42	96	92	88	88
query43	310	316	272	272
query44	1428	774	763	763
query45	190	181	168	168
query46	1074	1147	718	718
query47	1512	1471	1394	1394
query48	401	425	295	295
query49	576	410	284	284
query50	1091	424	341	341
query51	10428	10372	10469	10372
query52	83	87	73	73
query53	257	269	202	202
query54	281	254	225	225
query55	75	69	67	67
query56	314	292	301	292
query57	1043	996	925	925
query58	295	259	250	250
query59	1536	1609	1417	1417
query60	304	266	254	254
query61	148	151	148	148
query62	402	314	266	266
query63	235	202	196	196
query64	2886	1015	826	826
query65	3878	3814	3835	3814
query66	1821	477	352	352
query67	28159	28302	27946	27946
query68	3093	1691	970	970
query69	416	298	264	264
query70	906	803	771	771
query71	362	347	311	311
query72	2981	2731	2275	2275
query73	846	784	453	453
query74	4644	4526	4282	4282
query75	2365	2352	1994	1994
query76	2340	1144	766	766
query77	344	378	276	276
query78	11052	11089	10602	10602
query79	1236	1182	717	717
query80	611	549	450	450
query81	443	333	280	280
query82	229	154	118	118
query83	320	325	302	302
query84	306	155	130	130
query85	905	605	572	572
query86	277	227	230	227
query87	1780	1787	1687	1687
query88	3785	2826	2796	2796
query89	371	321	284	284
query90	2105	204	203	203
query91	203	188	163	163
query92	61	58	53	53
query93	1547	1477	950	950
query94	515	354	310	310
query95	797	602	481	481
query96	1053	825	378	378
query97	2467	2451	2349	2349
query98	203	194	191	191
query99	726	716	608	608
Total cold run time: 253733 ms
Total hot run time: 168981 ms

@Gabriel39
Gabriel39 marked this pull request as ready for review August 1, 2026 05:48
@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.10	0.05	0.05
query3	0.25	0.14	0.13
query4	1.62	0.14	0.14
query5	0.24	0.24	0.23
query6	1.16	0.80	0.80
query7	0.04	0.01	0.01
query8	0.06	0.04	0.04
query9	0.37	0.32	0.32
query10	0.55	0.58	0.55
query11	0.19	0.13	0.13
query12	0.17	0.14	0.15
query13	0.47	0.48	0.46
query14	1.01	1.00	1.00
query15	0.60	0.60	0.61
query16	0.32	0.32	0.31
query17	1.11	1.16	1.13
query18	0.22	0.19	0.20
query19	1.98	1.97	1.93
query20	0.02	0.01	0.01
query21	15.44	0.21	0.13
query22	4.80	0.05	0.05
query23	16.11	0.31	0.12
query24	2.71	0.41	0.34
query25	0.11	0.05	0.04
query26	0.74	0.20	0.14
query27	0.06	0.04	0.04
query28	3.58	0.79	0.36
query29	12.48	4.05	3.20
query30	0.29	0.15	0.15
query31	2.77	0.55	0.31
query32	3.24	0.58	0.48
query33	3.17	3.20	3.20
query34	15.64	3.92	3.29
query35	3.21	3.20	3.22
query36	0.54	0.43	0.42
query37	0.09	0.07	0.06
query38	0.05	0.04	0.03
query39	0.04	0.03	0.03
query40	0.17	0.15	0.14
query41	0.08	0.03	0.03
query42	0.04	0.03	0.03
query43	0.04	0.04	0.03
Total cold run time: 95.89 s
Total hot run time: 23.99 s

@Gabriel39 Gabriel39 changed the title [fix](lakehouse) Address schema evolution review follow-ups [fix](iceberg) Fix MVCC and nested schema evolution edge cases Aug 1, 2026

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

Request changes: three issues remain.

Checkpoint conclusions:

  • Goal and proof: the PR addresses nested schema evolution, Iceberg MVCC/write binding, strict-cast struct nullability, and SQL comment quoting, but it does not fully achieve that goal because valid Iceberg write shapes and strict narrowing casts still fail, and the BE collection path adds a redundant scan. The added tests do not exercise those three cases.
  • Scope and clarity: the changes are generally localized and the full 23-file diff was reviewed; no unrelated source change was identified.
  • Concurrency and lifecycle: the resolved-empty snapshot marker, handle copies, scan initialization, synchronous/streaming/count paths, and RowDelta base validation were traced. Production pin ordering preserves the empty snapshot, and no lock-order, static-lifetime, or release issue was found.
  • Configuration, compatibility, and persistence: no new configuration, storage-format, journal, symbol, or rolling-upgrade compatibility issue was found.
  • Parallel paths and data writes: ARRAY/MAP, struct/named_struct, partial/static/full/rewrite/row-level writes, and both SQL backslash modes were checked. The Iceberg validator incorrectly treats a write subset as a full captured schema.
  • FE/BE contract: snapshot state propagation is complete, but strict-cast logical nullability disagrees with the BE physical column type for narrowing casts.
  • Performance: the new nested collection probe performs an avoidable O(entries) null-map pass for absent/all-clear inherited masks. No other material CPU, memory, or observability issue was substantiated.
  • Tests and results: changed unit tests and assertions were statically inspected; no generated result-file issue was found. Builds and tests were not run because the authoritative review instructions prohibit them.

No additional user review focus was provided; the whole PR was reviewed.

Comment thread be/src/format_v2/table_reader.h Outdated
// only when a required descendant can consume them. This avoids scratch proportional
// to all array entries for the common all-required schema.
const NullMap* descendant_parent_null_map_ptr = nullptr;
if (_requires_parent_null_map_for_alignment(nested_column,

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.

_requires_parent_null_map_for_alignment() runs before this code establishes that the inherited parent mask exists and hides at least one row. For a large ARRAY/MAP with nullable-to-required descendants and a null or all-clear parent mask, the probe scans descendant null maps via has_null(), projection returns no entry mask, and normal alignment scans those descendants again. Please gate the descendant probe on a parent mask that can actually hide rows so this schema-evolution path does not add an avoidable O(number of entries) pass per block.

List<ConnectorColumn> boundColumns = handle.getColumns();
boolean hasSyntheticRowId = boundColumns.size() == currentColumns.size() + 1
&& DORIS_ICEBERG_ROWID_COL.equals(boundColumns.get(boundColumns.size() - 1).getName());
if (boundColumns.size() != currentColumns.size() && !hasSyntheticRowId) {

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.

handle.getColumns() is the query's bound write list, not the full schema snapshot. BindSink intentionally omits unspecified columns and static partition columns, and PhysicalPlanTranslator copies that subset into the handle, so a valid INSERT INTO t (id) ... for a two-column table (or an INSERT with a static partition) reaches this branch with different sizes and is rejected as schema drift even when the table never changed. Please carry the complete bound target schema separately for this comparison, while retaining the subset for value-to-column mapping.


/** Nullability of this cast when invalid input fails instead of producing NULL. */
public boolean strictModeNullable() {
return child().nullable();

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.

Strict failure semantics do not make every successful cast physically non-nullable. BE's strict BIGINT-to-INT specialization still has type Nullable(Int32) (with an all-clear map for valid rows), while this reports a required field and FE serializes Struct<Int32>. The generic nested-type compatibility check admits that mismatch, then FunctionStruct tries to insert the ColumnNullable argument into a non-null ColumnInt32 field and hits the column-type assertion even for an in-range value. Please keep the field nullable until strict casts actually return non-null types, or normalize the strict cast's physical result as part of this change.

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 78.79% (52/66) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.36% (31418/42252)
Line Coverage 58.57% (346062/590860)
Region Coverage 54.81% (288028/525545)
Branch Coverage 55.81% (128955/231076)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 14.05% (26/185) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

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

query1	0.00	0.00	0.01
query2	0.09	0.05	0.05
query3	0.25	0.14	0.12
query4	1.61	0.13	0.12
query5	0.24	0.22	0.23
query6	1.16	0.80	0.80
query7	0.03	0.01	0.01
query8	0.06	0.04	0.04
query9	0.38	0.31	0.31
query10	0.60	0.58	0.55
query11	0.19	0.13	0.13
query12	0.18	0.14	0.14
query13	0.45	0.46	0.46
query14	1.00	0.98	1.01
query15	0.59	0.58	0.60
query16	0.32	0.32	0.31
query17	1.12	1.06	1.10
query18	0.22	0.19	0.20
query19	2.06	1.85	1.99
query20	0.02	0.02	0.01
query21	15.45	0.21	0.13
query22	4.82	0.06	0.06
query23	16.14	0.32	0.13
query24	2.93	0.42	0.35
query25	0.11	0.06	0.05
query26	0.73	0.20	0.14
query27	0.04	0.03	0.03
query28	3.55	0.73	0.34
query29	12.47	4.12	3.25
query30	0.27	0.17	0.15
query31	2.77	0.55	0.31
query32	3.23	0.59	0.48
query33	3.22	3.11	3.21
query34	15.69	3.92	3.30
query35	3.26	3.22	3.23
query36	0.55	0.43	0.42
query37	0.09	0.06	0.07
query38	0.06	0.04	0.03
query39	0.03	0.04	0.03
query40	0.18	0.15	0.15
query41	0.08	0.03	0.03
query42	0.04	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 96.32 s
Total hot run time: 23.75 s

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

Request changes: four blocking write-correctness issues remain. Production type conversion rejects unchanged Iceberg schemas; row-level UPDATE/MERGE can move their validation baseline to a later schema; recursive Iceberg field identity is not fenced; and partition/write-sort planning still resolves live positions against older bound output.

Checkpoint conclusions:

  • Goal and proof: the head fixes the earlier partial/static write-list false positive, empty-snapshot lifecycle, strict-cast struct shape, and format-v2 descendant-scan cost, but the end-to-end schema-generation goal is incomplete because of the four inline findings. The added tests do not prove the real translator-to-provider path or the concurrent generation paths.
  • Scope and user focus: all 29 changed files and their upstream/downstream consumers were reviewed. The changes are generally localized and the new SPI method is defaulted. No additional user review focus was provided, so the whole PR was reviewed.
  • Concurrency: no new in-process shared-state, lock-order, or deadlock issue was found. The surviving races are external metadata updates between bind, row-level projection synthesis, physical partition/write-sort planning, and planWrite; supported no-cache/refresh behavior makes them reachable.
  • Lifecycle: snapshotResolved and the ordinary bound-schema list survive all traced immutable copies. Mandatory scan initialization pins before batch selection, so the provisional resolved-empty streaming concern is dismissed. No static-initialization, reference-cycle, cleanup, or ownership defect was found.
  • Configuration: no configuration item is added. Existing cache invalidation and Iceberg table-cache TTL 0 expose the mixed-generation cases; no separate dynamic-configuration issue was found.
  • Compatibility and protocol: the write-handle API addition is source-compatible, and no storage format, Thrift payload, EditLog, symbol, or rolling-upgrade carrier changes. The scalar ConnectorType encoding mismatch is nevertheless a direct behavioral compatibility break for ordinary writes.
  • Parallel paths and conditions: ordinary INSERT/OVERWRITE/REWRITE, explicit/static-partition writes, DELETE, COUNT/system/Top-N/rewrite-scope scans, RowDelta conflict validation, both SQL quoting modes, struct constructors, and ARRAY/MAP/STRUCT null-mask coordinates were checked. UPDATE/MERGE's compatibility constructor and the pre-validation position consumers are the missed parallel paths. The special conditions otherwise fail loudly and are documented; a default-only change is correctly dismissed because its old value is already an explicit legal expression.
  • Tests and results: changed tests and assertions were statically inspected and their expected behavior is consistent, but they bypass production type conversion and omit recursive field replacement, consecutive row-level schema reads, and live partition/write-sort positions. No build or test was run because the authoritative review instructions require static review only.
  • Observability: existing connector exceptions and scan/write profiles are sufficient once validation executes; no new logging, metric, or hot-INFO issue was found.
  • Persistence, transactions, data writes, and crashes: no FE persistence state is added and Iceberg atomic commit/abort behavior remains intact. However, recursive replacement and row-level generation skew can atomically commit payloads under the wrong field identity/order, while the positional paths can choose the wrong slot or fail before the intended retry exception. No separate crash-leak or recovery defect survived review.
  • FE/BE variables: no new variable needs FE-to-BE propagation and no scattered send path is missing.
  • Performance: the immutable schema copies and validation are O(schema) per write and outside row hot paths. The format-v2 all-clear/absent-mask gates remove the prior redundant descendant scan; no other material CPU or memory regression was substantiated.
  • Other issues and deduplication: the three existing threads cover only the earlier format-v2 scan cost, subset/full-schema comparison, and strict-cast nullability. The four submitted findings are distinct, and no other unresolved candidate remains after three converged review rounds.


private static ConnectorColumn toWriteConnectorColumn(Column column) {
ConnectorColumn result = new ConnectorColumn(column.getName(),
ConnectorColumnConverter.toConnectorType(column.getType()),

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.

[P1] Normalize the bound type before comparing it. A real unchanged Iceberg INTEGER arrives as ConnectorType("INT", -1, -1), becomes ScalarType.INT with 0/0, and is converted here to ConnectorType("INT", 0, 0); ConnectorType.equals compares those parameters, so ordinary INSERT/UPDATE/MERGE/REWRITE is rejected as "schema changed". Timestamps and several other scalars diverge too. The added provider tests construct canonical ConnectorType.of("INT") directly and miss this path; please compare one canonical representation and add a translator-to-provider test.

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Review step was failure (possibly timeout or cancelled)
Workflow run: https://github.com/apache/doris/actions/runs/30705596458

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 80.00% (60/75) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 59.19% (25645/43325)
Line Coverage 43.29% (257504/594869)
Region Coverage 38.97% (204117/523794)
Branch Coverage 40.30% (93121/231048)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 54.05% (40/74) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 80.00% (60/75) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 74.39% (31433/42256)
Line Coverage 58.63% (346436/590893)
Region Coverage 54.89% (288471/525561)
Branch Coverage 55.87% (129107/231086)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 89.19% (66/74) 🎉
Increment coverage report
Complete coverage report

@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Codex completed, but no new pull request review was submitted for the current head SHA.
Workflow run: https://github.com/apache/doris/actions/runs/30730895981

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17677	3923	3860	3860
q2	2007	336	203	203
q3	10261	1444	807	807
q4	4676	476	344	344
q5	7485	820	562	562
q6	180	169	136	136
q7	751	818	604	604
q8	9345	1588	1640	1588
q9	5983	4082	4135	4082
q10	6771	1655	1368	1368
q11	512	360	349	349
q12	764	585	456	456
q13	18089	3352	2757	2757
q14	269	260	242	242
q15	q16	739	726	657	657
q17	1010	918	997	918
q18	6830	5853	5570	5570
q19	1310	1248	1082	1082
q20	800	713	619	619
q21	5868	2643	2426	2426
q22	423	361	303	303
Total cold run time: 101750 ms
Total hot run time: 28933 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4304	4177	4161	4161
q2	288	310	212	212
q3	4513	4929	4387	4387
q4	2172	2273	1429	1429
q5	4269	4112	4139	4112
q6	225	175	128	128
q7	1699	1596	1651	1596
q8	2663	2183	2141	2141
q9	7441	7497	7473	7473
q10	4294	4279	3819	3819
q11	605	434	392	392
q12	720	729	501	501
q13	3257	3434	2849	2849
q14	293	307	270	270
q15	q16	733	722	626	626
q17	1322	1290	1294	1290
q18	8051	7181	7197	7181
q19	1201	1114	1123	1114
q20	2224	2235	1933	1933
q21	5277	4605	4440	4440
q22	519	463	419	419
Total cold run time: 56070 ms
Total hot run time: 50473 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 169135 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 772df71cf8b3a6947ad8249106550044f1d528e8, data reload: false

query5	4365	611	449	449
query6	480	222	198	198
query7	4892	563	360	360
query8	328	175	166	166
query9	8755	4022	4018	4018
query10	491	338	291	291
query11	5798	2192	1961	1961
query12	148	102	97	97
query13	1246	594	423	423
query14	6104	4664	4369	4369
query14_1	3849	3770	3760	3760
query15	204	205	172	172
query16	1008	469	451	451
query17	934	671	557	557
query18	2422	441	331	331
query19	205	184	140	140
query20	103	99	104	99
query21	226	156	134	134
query22	13051	13028	12741	12741
query23	17404	16282	15990	15990
query23_1	16138	16090	16097	16090
query24	7684	1685	1200	1200
query24_1	1261	1212	1213	1212
query25	556	466	383	383
query26	1323	356	222	222
query27	2589	624	381	381
query28	4501	2021	2019	2019
query29	1088	616	506	506
query30	342	263	230	230
query31	1120	1088	951	951
query32	104	65	64	64
query33	524	321	251	251
query34	1172	1132	669	669
query35	740	753	653	653
query36	786	791	710	710
query37	149	105	92	92
query38	1820	1644	1613	1613
query39	911	821	791	791
query39_1	797	774	803	774
query40	255	163	145	145
query41	78	71	70	70
query42	98	94	91	91
query43	315	320	278	278
query44	1434	801	774	774
query45	201	180	177	177
query46	1009	1164	717	717
query47	1557	1534	1454	1454
query48	404	415	316	316
query49	599	430	304	304
query50	1074	431	369	369
query51	10794	10818	10568	10568
query52	84	84	75	75
query53	257	264	206	206
query54	289	243	213	213
query55	75	71	64	64
query56	306	310	291	291
query57	1009	1006	928	928
query58	283	261	252	252
query59	1528	1573	1417	1417
query60	307	276	251	251
query61	152	144	147	144
query62	401	317	264	264
query63	228	211	193	193
query64	2823	1023	880	880
query65	3907	3831	3829	3829
query66	1828	475	387	387
query67	28252	28244	28150	28150
query68	3376	1535	945	945
query69	408	305	261	261
query70	868	784	764	764
query71	385	342	309	309
query72	3075	2669	2344	2344
query73	809	852	431	431
query74	4636	4510	4292	4292
query75	2403	2340	2000	2000
query76	2350	1118	729	729
query77	337	364	261	261
query78	11224	11131	10443	10443
query79	1208	1132	764	764
query80	613	550	465	465
query81	448	318	287	287
query82	235	157	116	116
query83	320	323	304	304
query84	317	154	130	130
query85	903	617	540	540
query86	284	229	224	224
query87	1792	1795	1706	1706
query88	3687	2787	2745	2745
query89	377	312	290	290
query90	2150	207	191	191
query91	202	188	166	166
query92	60	61	56	56
query93	1540	1477	936	936
query94	532	366	317	317
query95	789	532	547	532
query96	1008	774	343	343
query97	2440	2440	2332	2332
query98	208	197	209	197
query99	721	727	616	616
Total cold run time: 254980 ms
Total hot run time: 169135 ms

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Review step was failure (possibly timeout or cancelled)
Workflow run: https://github.com/apache/doris/actions/runs/30731675276

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@hello-stephen

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

query1	0.01	0.01	0.01
query2	0.09	0.05	0.04
query3	0.25	0.13	0.13
query4	1.61	0.14	0.14
query5	0.24	0.22	0.22
query6	1.16	0.85	0.81
query7	0.04	0.01	0.00
query8	0.06	0.04	0.04
query9	0.38	0.30	0.31
query10	0.54	0.58	0.55
query11	0.19	0.14	0.14
query12	0.19	0.14	0.15
query13	0.46	0.47	0.47
query14	0.99	0.98	0.98
query15	0.60	0.58	0.58
query16	0.31	0.31	0.31
query17	1.10	1.08	1.09
query18	0.20	0.20	0.20
query19	2.05	1.90	2.00
query20	0.02	0.02	0.01
query21	15.43	0.22	0.14
query22	4.86	0.05	0.04
query23	16.16	0.30	0.12
query24	2.96	0.42	0.34
query25	0.12	0.05	0.04
query26	0.84	0.21	0.14
query27	0.05	0.04	0.05
query28	3.40	0.78	0.35
query29	12.51	4.13	3.22
query30	0.27	0.16	0.15
query31	2.76	0.53	0.32
query32	3.23	0.59	0.48
query33	3.12	3.17	3.18
query34	15.64	3.98	3.30
query35	3.25	3.19	3.23
query36	0.56	0.44	0.43
query37	0.09	0.07	0.06
query38	0.06	0.03	0.04
query39	0.04	0.03	0.03
query40	0.17	0.15	0.15
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.03	0.04
Total cold run time: 96.19 s
Total hot run time: 23.88 s

@hello-stephen

Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 80.00% (60/75) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 59.16% (25631/43326)
Line Coverage 43.24% (257248/594927)
Region Coverage 38.94% (203979/523847)
Branch Coverage 40.28% (93071/231075)

@Gabriel39

Copy link
Copy Markdown
Contributor Author

run buildall

@Gabriel39

Copy link
Copy Markdown
Contributor Author

/review

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17770	4041	3997	3997
q2	2088	320	207	207
q3	10240	1432	804	804
q4	4678	473	341	341
q5	7508	851	552	552
q6	180	177	137	137
q7	743	801	624	624
q8	9329	1657	1548	1548
q9	5482	4131	4075	4075
q10	6777	1609	1347	1347
q11	515	368	330	330
q12	716	581	461	461
q13	18109	3402	2771	2771
q14	260	262	239	239
q15	q16	737	728	665	665
q17	1028	996	973	973
q18	6968	5769	5484	5484
q19	1300	1326	999	999
q20	830	657	599	599
q21	5958	2651	2467	2467
q22	434	358	301	301
Total cold run time: 101650 ms
Total hot run time: 28921 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4341	4232	4245	4232
q2	280	322	207	207
q3	4565	4955	4371	4371
q4	2178	2242	1430	1430
q5	4229	4130	4111	4111
q6	225	176	128	128
q7	1693	1565	1537	1537
q8	2741	2206	2143	2143
q9	7446	7572	7563	7563
q10	4295	4265	3918	3918
q11	569	417	367	367
q12	711	728	501	501
q13	3246	3427	2964	2964
q14	323	321	272	272
q15	q16	702	767	620	620
q17	1310	1291	1269	1269
q18	7921	7092	7196	7092
q19	1174	1126	1092	1092
q20	2237	2212	1911	1911
q21	5284	4565	4367	4367
q22	519	446	400	400
Total cold run time: 55989 ms
Total hot run time: 50495 ms

@hello-stephen

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

query5	4324	606	473	473
query6	464	226	207	207
query7	4858	584	345	345
query8	334	178	165	165
query9	8776	3975	3955	3955
query10	489	345	310	310
query11	5765	2198	2089	2089
query12	155	102	97	97
query13	1257	587	439	439
query14	6142	4671	4357	4357
query14_1	3802	3807	3755	3755
query15	211	208	171	171
query16	1016	464	452	452
query17	1124	688	567	567
query18	2437	468	379	379
query19	204	191	153	153
query20	112	101	101	101
query21	231	157	136	136
query22	13081	13090	12764	12764
query23	17273	16417	15980	15980
query23_1	16097	16072	16026	16026
query24	7458	1725	1221	1221
query24_1	1263	1253	1236	1236
query25	588	436	357	357
query26	1323	355	220	220
query27	2640	621	389	389
query28	4459	2046	2027	2027
query29	1084	589	453	453
query30	352	266	229	229
query31	1115	1073	947	947
query32	112	59	57	57
query33	497	304	233	233
query34	1199	1136	623	623
query35	728	741	631	631
query36	775	746	728	728
query37	146	102	88	88
query38	1814	1666	1588	1588
query39	828	829	816	816
query39_1	777	776	822	776
query40	243	171	144	144
query41	73	65	62	62
query42	90	90	120	90
query43	316	323	269	269
query44	1409	783	746	746
query45	196	174	168	168
query46	1056	1157	729	729
query47	1541	1533	1440	1440
query48	410	433	300	300
query49	574	401	294	294
query50	1040	423	355	355
query51	10642	10606	10788	10606
query52	88	85	79	79
query53	262	274	192	192
query54	284	243	213	213
query55	72	69	64	64
query56	285	306	305	305
query57	1028	1001	937	937
query58	289	263	249	249
query59	1580	1562	1369	1369
query60	298	269	255	255
query61	152	149	151	149
query62	397	312	261	261
query63	238	197	190	190
query64	2834	1031	861	861
query65	3927	3863	3839	3839
query66	1838	463	355	355
query67	28193	28162	28024	28024
query68	3149	1506	986	986
query69	390	314	263	263
query70	894	768	751	751
query71	368	336	348	336
query72	3205	2790	2452	2452
query73	828	836	469	469
query74	4603	4500	4332	4332
query75	2375	2339	1991	1991
query76	2331	1155	755	755
query77	341	360	269	269
query78	11200	11106	10672	10672
query79	1376	1121	768	768
query80	1294	555	454	454
query81	561	348	293	293
query82	625	150	112	112
query83	378	323	294	294
query84	287	156	131	131
query85	981	613	518	518
query86	415	235	230	230
query87	1821	1805	1707	1707
query88	3724	2784	2740	2740
query89	405	315	275	275
query90	1927	203	192	192
query91	204	193	168	168
query92	70	64	57	57
query93	1676	1576	1130	1130
query94	758	359	313	313
query95	780	531	556	531
query96	1044	870	336	336
query97	2490	2457	2340	2340
query98	214	193	194	193
query99	719	735	620	620
Total cold run time: 256274 ms
Total hot run time: 169269 ms

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

Review summary

The complete static review converged in one round with no new valuable inline findings. The current head/base still match the authoritative bundle (c1509e2081ae39181f6b88ac619c605cde4ed129 / 4ac235afe5586934de5481c524e2e7a8b1947af1). One P1 remains applicable: Iceberg write-sort positions are resolved in the getCols() subset/user-order coordinate domain and consumed against the full-schema sink output. I did not repost it because the same mechanism and outcome are already covered by discussion_r3696025156.

No additional user-provided focus was supplied, so I reviewed the whole 42-file change set.

Critical checkpoint conclusions

  • Goal and tests: The MVCC empty-snapshot fence, bound-schema identity propagation, nested nullability alignment, struct cast nullability, and SQL comment quoting changes match the stated goals. Added tests exercise the intended failures; no build or test command was run because this review is explicitly static-only.
  • Scope and focus: All authoritative changed files and their relevant callers, consumers, and tests were covered. No unrelated behavior was used to expand the review scope.
  • Concurrency: Query-begin empty snapshots remain fenced across eager, COUNT, and streaming dispatch; property loading pins before every production batch decision. Iceberg's null RowDelta baseline validates all versions, and the barrier test covers a concurrent first append.
  • Lifecycle and ownership: Immutable Iceberg handle copies preserve snapshot/ref/schema, resolved-empty, rewrite-scope, and Top-N state. Connector session/TCCL and transaction begin/commit ownership remain balanced; no leak or stale-handle path was found.
  • Configuration: Batch-mode enable/threshold settings, Iceberg type-mapping flags, SQL escape modes, merge partitioning, and cache-enabled/disabled paths were checked. No new invalid-default or ignored-setting issue was found.
  • Compatibility: New SPI methods retain compatible defaults/overloads. Scalar type parameters are canonicalized where parameterless, meaningful parameters remain compared, and recursive IDs/requiredness survive the connector boundary. No new API or serialized-format break was found.
  • Parallel paths: Ordinary/partial/static/reordered INSERT, UPDATE, MERGE, REWRITE, eager/COUNT/streaming/system scans, and STRUCT/ARRAY/MAP paths were traced. The only surviving positional defect is the existing Iceberg sort thread cited above.
  • Special conditions: Resolved-empty versus unresolved-latest, snapshotless metadata tables, explicit time travel, v3 lineage fields, hidden/all-clear parent masks, nested required fields, and both SQL escape modes were checked without finding a distinct issue.
  • Test coverage and result correctness: The tests use deterministic barriers and direct state/output oracles for the changed contracts. The remaining integrated partial/reordered write-sort gap is already requested in the existing thread. Test execution was not permitted for this review.
  • Observability: Existing error propagation, EXPLAIN/profile behavior, and connector failure visibility remain intact; no new silent-degrade, logging, or metrics gap was found.
  • Transactions and persistence: Empty-read MERGE conflict validation covers the first append, begin remains single-owner, and commit validation retains its conflict filters. No EditLog or other FE persistence format is changed.
  • Data writes, atomicity, and crash behavior: Bound schema generations, recursive field identity, and v3 reserved columns are carried through write planning and validation. No new partial-commit or crash-consistency issue was found; the already-threaded sort-coordinate mismatch still needs resolution.
  • FE/BE contracts and variables: Struct field nullability now matches nullable BE cast wrappers, connector type conversion preserves nested metadata, and sink sort/partition information was traced end to end. No new variable-propagation issue was found.
  • Performance: The format-v2 gate avoids descendant scans and entry-sized scratch allocation when the ancestor mask is absent or all-clear; required ARRAY/MAP projections remain coordinate-correct. No new hot-path regression was found.
  • Other issues: No security-sensitive behavior was requested or introduced, and no additional correctness issue survived independent verification and duplicate suppression.

Review status: complete and converged; zero new inline comments.

@hello-stephen

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

query1	0.01	0.01	0.00
query2	0.09	0.05	0.05
query3	0.25	0.14	0.13
query4	1.61	0.14	0.14
query5	0.24	0.22	0.22
query6	1.16	0.80	0.83
query7	0.04	0.01	0.01
query8	0.05	0.03	0.03
query9	0.37	0.33	0.32
query10	0.56	0.55	0.59
query11	0.18	0.14	0.14
query12	0.18	0.14	0.13
query13	0.47	0.46	0.46
query14	0.98	1.00	1.00
query15	0.60	0.59	0.58
query16	0.31	0.32	0.32
query17	1.09	1.08	1.16
query18	0.21	0.20	0.20
query19	2.03	1.92	1.92
query20	0.02	0.01	0.02
query21	15.43	0.18	0.14
query22	4.94	0.05	0.05
query23	16.13	0.31	0.12
query24	2.99	0.42	0.34
query25	0.12	0.05	0.04
query26	0.73	0.21	0.15
query27	0.04	0.03	0.04
query28	3.58	0.79	0.35
query29	12.52	4.08	3.19
query30	0.29	0.16	0.16
query31	2.77	0.56	0.31
query32	3.22	0.60	0.49
query33	3.29	3.27	3.15
query34	15.44	3.97	3.32
query35	3.25	3.22	3.21
query36	0.55	0.45	0.43
query37	0.08	0.07	0.06
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.15
query41	0.08	0.03	0.02
query42	0.04	0.03	0.02
query43	0.04	0.03	0.04
Total cold run time: 96.25 s
Total hot run time: 23.92 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

Increment line coverage 58.28% (95/163) 🎉
Increment coverage report
Complete coverage report

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 80.00% (60/75) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 75.76% (32015/42257)
Line Coverage 60.39% (356878/590951)
Region Coverage 56.97% (299429/525614)
Branch Coverage 58.40% (134964/231113)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 8.59% (14/163) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants