Skip to content

[fix](external) Preserve ES residual filters and repair scanner regression setup - #69650

Merged
Gabriel39 merged 1 commit into
apache:masterfrom
Gabriel39:fix/es-scanner-v2-regression-coverage
Oct 27, 2026
Merged

Gabriel39 merged 1 commit into
apache:masterfrom
Gabriel39:fix/es-scanner-v2-regression-coverage

Conversation

@Gabriel39

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Related PR: #69614

external_table_p2/es/test_es_file_scanner_v2.groovy fails on its first legacy-scanner baseline query with Table [test1] does not exist in database [default_db]. Its interpolated port key is a Groovy GString, while otherConfigs is a Properties containing String keys. Properties.get(Object) returns null even when the port is configured, producing http://<es-host>:null. Convert the key to String and fail explicitly when the configuration is absent. The failure happens before any V2 result comparison or BE scan.

The coverage review also found a query correctness issue shared by both scanners: a nested AND can return a partial ES DSL and record an unsupported child, but the single-expression path ignored that residual tracking. For (a = 1 AND local_predicate) OR a = 2, the engine could drop the local predicate; NOT(a = 1 AND local_predicate) could also become an unsafe NOT(a = 1) at the source. Retain the complete expression locally whenever conversion records a residual. Fully pushable expressions and independent top-level AND conjuncts retain their existing pushdown behavior.

Expand coverage in the same change:

  • ES 5/6/7/8 V1/V2 comparisons across source/docvalue scans, parallel/whole-index scrolling, and batch sizes 1/1024. Add scalar/date/array/JSON, IN/NOT IN, null, raw ES query, residual filtering, aggregation and LIMIT cases; restore every changed session variable.
  • An independent equivalent-query oracle for nested residual OR, since a V1/V2 comparison alone cannot detect a shared FE error. Compare cardinality for unordered LIMIT rather than document identity across BEs.
  • FE tests for residual tracking, docvalue eligibility and field-count boundaries, alias/context serialization, shard planning and safe early-stop parameters.
  • BE tests for source-only fallback, missing/null docvalues and empty arrays, real HTTP empty results, early close and scroll 404/500 cleanup. Add an opt-in authenticated live-reader smoke test.

Release note

Preserve local filtering for Elasticsearch compound predicates that cannot be completely pushed down.

Check List (For Author)

  • Test
    • FE: all 127 ES connector tests pass. The two new nested OR/NOT tests fail before the residual-tracking fix.
    • BE: all 27 selected ES ASAN tests pass against authenticated Elasticsearch 9.0.0 and 9.5.5, including source/docvalue reads with batch size 1.
    • FE Checkstyle for the ES module and its reactor dependencies; clang-format 16, clang-tidy on changed C++ lines, and BE build-hygiene checks.
    • Groovy 4.0.19: reproduce the null port before the fix; verify all four port lookups, suite setup/matrix execution, missing configuration, disabled execution and restoration after an injected query failure. The setup probe substitutes SQL execution and does not validate SQL results.
    • Full external ES 5/6/7/8 SQL regression run; requires the external Docker fixtures and a Doris cluster.
  • Behavior changed:
    • Yes: residual ES predicates remain enforced; regression setup reads configured ports correctly.
  • Does this need documentation?
    • No: existing catalog properties and scanner session variables are unchanged.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

…ssion setup

### What problem does this PR solve?

Related PR: apache#69614

`external_table_p2/es/test_es_file_scanner_v2.groovy` fails on its first legacy-scanner baseline query with `Table [test1] does not exist in database [default_db]`. Its interpolated port key is a Groovy `GString`, while `otherConfigs` is a `Properties` containing `String` keys. `Properties.get(Object)` returns null even when the port is configured, producing `http://<es-host>:null`. Convert the key to `String` and fail explicitly when the configuration is absent. The failure happens before any V2 result comparison or BE scan.

The coverage review also found a query correctness issue shared by both scanners: a nested AND can return a partial ES DSL and record an unsupported child, but the single-expression path ignored that residual tracking. For `(a = 1 AND local_predicate) OR a = 2`, the engine could drop the local predicate; `NOT(a = 1 AND local_predicate)` could also become an unsafe `NOT(a = 1)` at the source. Retain the complete expression locally whenever conversion records a residual. Fully pushable expressions and independent top-level AND conjuncts retain their existing pushdown behavior.

Expand coverage in the same change:

- ES 5/6/7/8 V1/V2 comparisons across source/docvalue scans, parallel/whole-index scrolling, and batch sizes 1/1024. Add scalar/date/array/JSON, IN/NOT IN, null, raw ES query, residual filtering, aggregation and LIMIT cases; restore every changed session variable.
- An independent equivalent-query oracle for nested residual OR, since a V1/V2 comparison alone cannot detect a shared FE error. Compare cardinality for unordered LIMIT rather than document identity across BEs.
- FE tests for residual tracking, docvalue eligibility and field-count boundaries, alias/context serialization, shard planning and safe early-stop parameters.
- BE tests for source-only fallback, missing/null docvalues and empty arrays, real HTTP empty results, early close and scroll 404/500 cleanup. Add an opt-in authenticated live-reader smoke test.

### Release note

Preserve local filtering for Elasticsearch compound predicates that cannot be completely pushed down.

### Check List (For Author)

- Test
    - [x] FE: all 127 ES connector tests pass. The two new nested OR/NOT tests fail before the residual-tracking fix.
    - [x] BE: all 27 selected ES ASAN tests pass against authenticated Elasticsearch 9.0.0 and 9.5.5, including source/docvalue reads with batch size 1.
    - [x] FE Checkstyle for the ES module and its reactor dependencies; clang-format 16, clang-tidy on changed C++ lines, and BE build-hygiene checks.
    - [x] Groovy 4.0.19: reproduce the null port before the fix; verify all four port lookups, suite setup/matrix execution, missing configuration, disabled execution and restoration after an injected query failure. The setup probe substitutes SQL execution and does not validate SQL results.
    - [ ] Full external ES 5/6/7/8 SQL regression run; requires the external Docker fixtures and a Doris cluster.
- Behavior changed:
    - [x] Yes: residual ES predicates remain enforced; regression setup reads configured ports correctly.
- Does this need documentation?
    - [x] No: existing catalog properties and scanner session variables are unchanged.

### 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
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

@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 five changed files at 06d1850f3aa5e05a089c27624065c88e308ff340 found no introduced issue requiring an inline finding. There are no existing inline findings to retain. No additional user focus was supplied.

The changed single-expression guard preserves the complete OR/NOT whenever conversion records an unsupported nested child. I traced the residual index through the connector result, FE conjunct retention and predicate-slot materialization, both scanner implementations, and source/scanner LIMIT decisions. Independent FE, BE/regression, and predicate-flow reviews all returned NO_NEW_VALUABLE_FINDINGS; all candidates and initial risks have evidence-backed dispositions.

Critical checkpoint conclusions:

  1. Goal and proof: the recorded-partial-predicate fix and String port-key lookup match their stated failure paths. New unit cases cover partial AND, OR/NOT fallback and fully pushable controls; the regression suite adds an independent nested-OR oracle. These tests were inspected, not executed.
  2. Scope and reuse: the production change is one condition with a concrete explanatory example. Expanded tests reuse existing connector fakes and reader helpers.
  3. Concurrency and locks: predicate conversion uses local accumulators and introduces no shared mutation or lock. HTTP test counters are atomic; handler options are set before workers start. No new lock-order or heavy-work-under-lock issue was found.
  4. Lifecycle and memory: test declaration order keeps handlers alive until server workers stop and join, with readers closed first. Early close, empty results and 404/500 paths exercise scroll cleanup. No new production allocation, ownership or static-initialization mechanism is added.
  5. Configuration: no configuration item is added. The three changed session variables are captured and restored in finally; missing port configuration fails explicitly.
  6. Compatibility: no function symbol, plugin SPI or storage-format change is introduced. Existing ES properties and residual-index contracts remain in use.
  7. Thrift/protobuf: no definitions or field IDs change; new tests inspect existing ES Thrift fields.
  8. Parallel paths: the single OR/NOT guard now agrees with existing partial-child handling under a top-level AND. Both scanners consume the same FE result; source/docvalue and parallel/whole-index paths are covered by the test matrix.
  9. Conditional checks: the changed guard documents the concrete unsafe NOT example; tests cover both rejection and successful-pushdown cases.
  10. Coverage: inspected FE builder/planning tests, BE projection/null/empty-array/error/cleanup tests, and the ES5/6/7/8 matrix at batch sizes 1 and 1024. Version-specific fixtures and query fields match their guards. The optional live-reader test remains opt-in.
  11. Expected results: new assertion values agree with mapping, routing, serialization and parser code. Ordering is deterministic for the fixtures; unordered LIMIT compares cardinality. No golden result files change.
  12. Observability: no new operational stage or metric is needed for this guard. Existing query DSL, scanner profiles and error paths cover the affected flow.
  13. Transactions and persistence: no transaction, visible-version, delete-bitmap, EditLog or failover behavior is changed by this read-planning fix.
  14. Writes and atomicity: no production data-write path is changed; HTTP test cleanup is explicit and checked.
  15. FE/BE variables: no new transmitted variable or sending point is added. Retained predicates prevent the all-conjuncts-pushed flag, so the existing source early-stop gate withholds LIMIT; scanner limits count filtered survivors.
  16. Performance: the new emptiness check adds no traversal. Wider source reads for incompletely pushable compounds are required to preserve local filtering. Test expansion is bounded by small fixtures.
  17. Additional recheck: inspected unsupported converters, predicate-only columns, source-only fields, JSONB sorting, empty/error pages and parallel paths. Computed IS NULL tracking and mixed source-only ESQUERY/local composition limitations predate this change and were not promoted to introduced findings. No unresolved static candidate remains.

Review converged in one round. Validation is static only: no builds, tests, formatting tools, benchmarks or live ES/Doris execution were run. The author's reported results and full external ES5/6/7/8 runtime interoperability were not independently verified.

Review converged after 1 round(s).

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17595	5201	5067	5067
q2	2096	315	284	284
q3	10226	1382	818	818
q4	4688	455	329	329
q5	7413	793	531	531
q6	174	184	150	150
q7	747	793	596	596
q8	9252	1330	989	989
q9	5458	4172	4163	4163
q10	6840	1281	1016	1016
q11	426	252	235	235
q12	631	405	276	276
q13	18085	3584	3024	3024
q14	270	267	243	243
q15	q16	724	713	663	663
q17	1191	757	571	571
q18	7015	6160	6088	6088
q19	1110	955	583	583
q20	372	338	225	225
q21	4935	2146	2303	2146
q22	340	291	251	251
Total cold run time: 99588 ms
Total hot run time: 28248 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	5601	5625	5593	5593
q2	676	561	545	545
q3	5200	5336	4919	4919
q4	2040	2119	1526	1526
q5	5267	5188	5457	5188
q6	253	201	163	163
q7	2305	2116	1879	1879
q8	2990	2742	2763	2742
q9	8028	8171	8143	8143
q10	3880	3732	3301	3301
q11	641	476	429	429
q12	722	706	539	539
q13	3639	3965	3380	3380
q14	312	313	294	294
q15	q16	681	704	643	643
q17	8225	6955	6857	6857
q18	12991	12216	12856	12216
q19	908	760	761	760
q20	2132	2139	1914	1914
q21	5569	4581	4699	4581
q22	483	458	404	404
Total cold run time: 72543 ms
Total hot run time: 66016 ms

@hello-stephen

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

query5	4310	596	442	442
query6	421	203	187	187
query7	4832	445	220	220
query8	321	165	146	146
query9	8780	3074	3092	3074
query10	480	301	248	248
query11	5986	3865	3571	3571
query12	147	89	86	86
query13	1243	451	332	332
query14	6148	3942	3627	3627
query14_1	3429	3406	3435	3406
query15	209	202	186	186
query16	941	377	420	377
query17	862	649	537	537
query18	2422	433	310	310
query19	203	167	139	139
query20	94	87	80	80
query21	208	130	105	105
query22	13017	12951	12794	12794
query23	13384	12985	12427	12427
query23_1	12455	12590	12461	12461
query24	7376	809	440	440
query24_1	462	459	464	459
query25	504	383	333	333
query26	1250	249	132	132
query27	2808	431	265	265
query28	4618	1921	1931	1921
query29	1547	570	426	426
query30	294	220	177	177
query31	1009	911	808	808
query32	134	82	104	82
query33	516	285	226	226
query34	892	840	480	480
query35	716	741	638	638
query36	820	819	745	745
query37	117	95	74	74
query38	1769	1739	1642	1642
query39	797	793	736	736
query39_1	725	729	736	729
query40	209	118	91	91
query41	67	63	62	62
query42	86	82	79	79
query43	345	358	314	314
query44	1299	681	684	681
query45	178	172	160	160
query46	822	978	552	552
query47	2860	2848	2619	2619
query48	286	297	214	214
query49	562	390	284	284
query50	669	280	229	229
query51	10456	10661	10546	10546
query52	81	79	67	67
query53	183	199	144	144
query54	244	190	190	190
query55	70	62	70	62
query56	218	201	216	201
query57	1667	1602	1550	1550
query58	284	258	250	250
query59	2145	2206	2014	2014
query60	289	244	223	223
query61	178	147	147	147
query62	382	326	286	286
query63	187	154	161	154
query64	2746	914	822	822
query65	3306	3282	3258	3258
query66	1786	408	298	298
query67	20085	20147	20041	20041
query68	2965	1000	606	606
query69	406	305	254	254
query70	834	787	767	767
query71	286	226	220	220
query72	2748	2610	2343	2343
query73	502	512	293	293
query74	4589	4474	4340	4340
query75	2296	2289	1916	1916
query76	2312	1008	574	574
query77	347	374	257	257
query78	9667	9752	9178	9178
query79	887	850	514	514
query80	465	421	335	335
query81	522	311	272	272
query82	199	122	101	101
query83	188	188	174	174
query84	291	120	102	102
query85	757	416	368	368
query86	259	240	224	224
query87	1959	1973	1814	1814
query88	3598	2678	2667	2667
query89	310	276	240	240
query90	2082	162	152	152
query91	157	144	119	119
query92	98	85	88	85
query93	978	972	567	567
query94	459	302	262	262
query95	580	329	355	329
query96	671	485	229	229
query97	2428	2439	2317	2317
query98	158	148	149	148
query99	757	771	651	651
Total cold run time: 232552 ms
Total hot run time: 150410 ms

@hello-stephen

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

query1	0.01	0.00	0.01
query2	0.08	0.05	0.05
query3	0.26	0.10	0.09
query4	1.61	0.10	0.10
query5	0.23	0.25	0.25
query6	1.17	0.68	0.69
query7	0.04	0.01	0.01
query8	0.05	0.04	0.04
query9	0.41	0.34	0.34
query10	0.56	0.56	0.58
query11	0.20	0.14	0.14
query12	0.18	0.14	0.15
query13	0.50	0.49	0.49
query14	1.04	1.02	1.01
query15	0.64	0.61	0.60
query16	0.35	0.33	0.35
query17	1.17	1.11	1.12
query18	0.20	0.19	0.19
query19	2.15	1.91	2.02
query20	0.02	0.01	0.01
query21	15.48	0.18	0.13
query22	4.96	0.05	0.05
query23	16.27	0.31	0.13
query24	2.75	0.85	0.41
query25	0.12	0.05	0.05
query26	1.57	0.21	0.16
query27	0.05	0.06	0.05
query28	3.63	0.76	0.37
query29	12.50	4.17	3.33
query30	0.28	0.14	0.11
query31	2.78	0.55	0.32
query32	3.24	0.59	0.51
query33	3.14	3.17	3.24
query34	15.46	3.96	3.37
query35	3.34	3.35	3.34
query36	0.56	0.44	0.42
query37	0.10	0.06	0.07
query38	0.05	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.15	0.15
query41	0.09	0.03	0.03
query42	0.04	0.02	0.03
query43	0.04	0.03	0.04
Total cold run time: 97.54 s
Total hot run time: 24.33 s

@hello-stephen

Copy link
Copy Markdown
Contributor

FE UT Coverage Report

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

@Gabriel39
Gabriel39 merged commit 3dc7341 into apache:master Oct 27, 2026
36 of 38 checks passed
@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 77.47% (36123/46628)
Line Coverage 62.72% (408565/651365)
Region Coverage 59.19% (345405/583538)
Branch Coverage 60.11% (159851/265931)

Gabriel39 added a commit that referenced this pull request Oct 27, 2026
)

### What problem does this PR solve?

Related PR: #69650 (reader regression coverage)

With `nodes_discovery=true`, ES metadata loading follows
`EsMetadataFetcher.fetchShards -> EsConnectorRestClient.getHttpNodes ->
EsNodeInfo -> EsMajorVersion.parse`. The parser accepts only majors
through 8, so a 9.x node makes discovery fail with an
unsupported-version exception. The configured-seed path with discovery
disabled does not parse node versions and is not affected in the same
way.

Add the explicit ES 9 major, comparisons and latest-supported bound
while continuing to reject unvalidated future majors with a clear
diagnostic. Add an HTTP unit test containing mixed 8.19/9.0 nodes, IPv6
routing and a node without HTTP, plus an opt-in live compatibility suite
rather than relying on version parsing alone.

The live suite creates isolated temporary indices and checks the
production connector's `_nodes/http`, `_mapping`, `_search_shards`,
index listing and metadata fetching with discovery enabled/disabled. It
also verifies authenticated source/docvalue scroll requests, missing
values, pagination, scroll cleanup and invalid-credential failures.
Enable it with `DORIS_ES9_TEST_URL`, `DORIS_ES9_TEST_USER` and
`DORIS_ES9_TEST_PASSWORD`.

### Release note

Allow Elasticsearch 9.x nodes during ES catalog node discovery.

### Check List (For Author)

- Test
- [x] Version parsing and mixed-node tests reproduce the unsupported-9.x
failure before the change.
- [x] All 124 ES connector tests pass with live authenticated
Elasticsearch 9.0.0 and 9.5.5, including the three opt-in compatibility
tests on each version.
- [x] Default unit-test execution passes with the live suite disabled
when no endpoint is configured.
    - [x] FE Checkstyle for the ES module and its reactor dependencies.
- [x] The BE ES reader also reads the authenticated three-row fixture
through source/docvalue scans with batch size 1 on both versions, using
the reader coverage change in the related ES regression PR.
- [ ] Full Doris SQL end-to-end validation against ES 9; the live tests
above validate connector metadata and HTTP reader compatibility.
- Behavior changed:
- [x] Yes: discovery accepts ES 9 nodes; later unverified majors remain
rejected.
- Does this need documentation?
    - [x] No new catalog properties or configuration are introduced.

### Check List (For Reviewer who merge this PR)

- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
Gabriel39 added a commit to Gabriel39/incubator-doris that referenced this pull request Oct 29, 2026
Apply the outstanding changes in master merge order:
apache#69545 7d16729
apache#69551 7224a2d
apache#69612 61d1aef
apache#69615 8d2bd1e
apache#69650 3dc7341
apache#69651 c00ecb1
apache#69646 e493c61
apache#69668 7865646

apache#69614 already exists on branch-4.2 through apache#69644.
Adapt datasource APIs and tests to the release branch, retaining its
existing scanner dispatch and statement-bound metadata contracts.
yiguolei pushed a commit that referenced this pull request Oct 30, 2026
### What problem does this PR solve?

Backport the requested external-data and FileScannerV2 changes to
`branch-4.2` in their actual master merge order:

| Order | Master PR | Change | Backport |
| --- | --- | --- | --- |
| 1 | #69545 | Preserve Paimon schema options after field renames |
Included |
| 2 | #69551 | Expand Iceberg capability, transaction and snapshot tests
| Included with 4.2 API adaptations |
| 3 | #69614 | Elasticsearch HTTP scans in FileScannerV2 | Already
present through #69644 (`2104b7509cda`); not applied twice |
| 4 | #69612 | Check catalog visibility before SHOW DATABASES accesses
metadata | Included |
| 5 | #69615 | Publish Iceberg Parquet split offsets | Included |
| 6 | #69650 | Preserve ES compound residuals and expand scanner
coverage | Included |
| 7 | #69651 | Accept Elasticsearch 9.x during node discovery | Included
|
| 8 | #69646 | Prioritize Parquet V2 row groups using TopN bounds |
Included |
| 9 | #69668 | Arrow loads and schema inference in FileScannerV2 |
Included |

The eight outstanding changes are combined in one commit. This branch
retains the 4.2 FE datasource APIs instead of importing master's
connector-module refactor.

### Backport adaptations

- Port Paimon schema restoration, catalog-option provenance, fallback
handling and tests to the existing table-copy/serialization lifecycle.
Keep statement-bound fields when reader options are applied after a
schema-only rename.
- Exercise Iceberg's existing metadata and transaction entry points with
real in-memory tables and retained-generation fixtures. Preserve the
nine disabled known-bug reproductions; omit two connector-only lifecycle
tests. Expiration checks verify live data-file sets and exact
delete-file counters; 4.2's separate manifest-name/data-counter issue
remains unchanged. The delete/history SQL suite checks visible rows and
eager/late-materialization parity because 4.2 does not expose master's
`_file`/`_pos` columns. The inventory labels upstream-only evidence
explicitly.
- Port ES residual tracking to the legacy planner and add compound
OR/NOT, docvalue eligibility and Thrift-context tests there. Use Java
8-compatible HTTP APIs for opt-in ES 9 tests and the branch's supported
node-address fixtures.
- Keep the existing full-schema Iceberg metadata-table scan, which
already supplies the file-size dependency for split offsets. Adapt the
external write suite to verify offsets without requiring master-only
distribution plans or golden output.
- Use the existing Parquet statistics interface and physical
row-location representation. Keep the TopN scheduling and pruning
invariants.
- Include the shared Arrow array normalizer required by the new reader,
taken from the same master revision. Preserve 4.2 Lance/Avro dispatch;
omit the schema-inference test for the unavailable Hive OpenCSV parser.

### Validation

- FE production and test sources compile with the branch's Java 8
target. Across the targeted runs and focused reruns, 20 test classes
report 181 discovered, 171 passed, zero failures/errors, and 10 skipped:
nine intentionally disabled known-bug reproductions plus the opt-in live
ES 9 class.
- FE Checkstyle: passed with zero violations.
- Clang compiler syntax checks: all 23 affected C++ translation units
passed against the current sources and freshly generated Thrift, using
cached third-party/generated build dependencies. Focused BE runtime
validation is listed below.
- clang-format 16: all 30 affected C++ source/header files passed.
- Groovy 4.0.19 syntax and AST conversion: all seven changed suites
passed. All 105 local inventory links resolve.
- Complete staged-diff self-review, whitespace/conflict checks, and
sensitive-information checks passed.

A full BE rebuild and SQL/external-service regressions were not run
locally. Live ES 9 tests require their opt-in endpoint. CI is requested
for the combined backport.

### Release note

Fix Paimon reads after field renames, external-catalog SHOW DATABASES
authorization, and ES compound residual filtering. Support ES 9.x node
discovery, publish Iceberg Parquet split offsets, improve Parquet V2
TopN row-group scheduling, and use FileScannerV2 for Arrow loads and
text/JSON schema inference.

### Check List (For Author)

- Test
    - [x] Unit Test
- [x] Regression test additions and syntax checks; SQL execution pending
CI
- Behavior changed:
    - [x] Yes. Backport the changes listed above.
- Does this need documentation?
- [x] No. Existing interfaces and settings are retained; the test
coverage inventory is included.

### Follow-up fixes

- Set the Thrift `enable_file_scanner_v2` default to `true`, matching
the session default. Preserve explicit `false` for legacy query scans
and extend the existing load-selection test.
- Keep the selected Paimon snapshot and schema together during relation
projection. Historical sequence/aggregation options must not be combined
with the latest field names. Read-only principals can resolve historical
selectors without INSERT permission.
- Read legacy append schemas with missing or empty bucket keys without
bucket pruning, preserving every historical file. The regression covers
both unaware and multiple fixed buckets.

Follow-up validation: 169 targeted Paimon FE tests passed with zero
failures/errors/skips. FE production compilation and Checkstyle passed.
Both changed C++ test translation units passed compiler syntax checks
and clang-format 16. Regenerated Java/C++ defaults are enabled; a Java
8-targeted protocol check verifies constructor/clear defaults, an
omitted wire field, and an explicit-false round trip. Complete BE CI and
live external SQL suites remain pending.

The two new reproductions first failed with the same missing-bucket-key
and renamed-sequence-field errors as CI. A separate read-only-principal
reproduction also failed before the permission correction. Complete
external regression execution remains pending CI.

### BE unit-test compatibility

- Complete the native Arrow Variant input dependency for `branch-4.2`:
accept binary storage and the Parquet Variant extension, validate
metadata and payloads before appending, and retain owned data after
Arrow buffers are released. Allow that ingestion path through the load
reader while preserving query-format restrictions and source-default
validation.
- Preserve Variant V2 markers in the Arrow test fixtures, including
nested types. Verify timestamp input against this branch's SerDe for
positive, negative, and second-boundary values. Match the existing DATE
range diagnostic in the TopN pruning test.
- Add tests for sliced and empty reads, invalid ranges and carriers,
malformed metadata/payloads, NULL children, atomic failure, buffer
ownership, and the query capability boundary.

Validation: all 13 previously failing BE tests passed. The expanded run
passed all 309 tests across nine suites, including Arrow/JSON loads,
load validation, Iceberg, table mapping, and Variant input/output. The
focused executable rebuilds the affected readers and SerDe against
cached 4.2 build dependencies; this is not a complete BE rebuild. All
seven changed C++ translation units passed compiler checks with current
headers/generated Thrift, and all 33 affected C/C++ files passed
clang-format 16. The complete staged diff, whitespace, and
sensitive-information checks passed. Full CI is requested with `run
buildall` and `/review`.
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.

3 participants