Skip to content

Commit 949a806

Browse files
[improvement](fe) Upgrade Paimon to 2.1.0 (apache#69343)
### What problem does this PR solve? Issue Number: N/A Related PR: N/A Problem Summary: Upgrade the Paimon Java SDK from 1.4.2 to 2.1.0, the latest stable release published on October 12, 2026 ([upstream release](https://github.com/apache/paimon/releases/tag/release-2.1.0)). Pin the FE connector and BE JNI scanner to the same shared `paimon.version`, since tables, splits, and commit messages cross the FE/BE boundary using Paimon's serialization. Adapt the connector to the removal of Paimon's file-based `Privilege*` API in 2.1.0, removing its obsolete catalog/table wrappers and reflection-based delegate reconstruction. Preserve catalog query authorization, fallback/chain branch semantics, statement-bound schemas and snapshots, and Doris metadata-cache governance. Update local test fixtures to `FileSystemSchemaManager` and the extended `Snapshot` constructor. Give scanner tests the `java.nio` access already enabled in the BE JVM for Arrow Variant buffer views. Update the oversized-write negative test to the SDK's revised diagnostic while retaining its snapshot/row atomicity checks. Retain the branch/scan API adaptations and grouped format-file split fixture required since 2.0. Verify both the default wrapping and explicitly enabled checked integer-overflow modes in 2.1, as well as the corrected pre-epoch timestamp-to-date cast. Keep the existing Rust reader eligibility rules and common/S3 compatibility patches. Fix changelog MERGE target-presence detection for nullable primary keys: matched-only plans use their INNER JOIN semantics, while plans with INSERT branches use a pre-join marker. Keep that private marker outside user expression resolution. Preserve catalog query authorization for the new `$file_indexes` system table and pin both serialized table payloads to the catalog-published snapshot before stripping their catalog loaders. Adapt timestamp precision repair to the SDK's authorization projection validation and four-argument policy callback; use real JSON policy definitions in serialized scanner fixtures. Reject `scan.mode=latest-delta` in Doris `@options`, because the existing full-snapshot pinning would silently widen a delta scan; explicit `@incr` ranges remain available. The FE and BE Java extensions must be deployed with the same SDK version. This change does not establish compatibility between mixed 1.4.2/2.1.0 SDKs during a rolling upgrade. ### Paimon 2.1 feature impact on Doris | Upstream change | Doris impact and scope of this PR | | --- | --- | | [Nullable primary keys](apache/paimon#9094), opt-in with `primary-key.nullable=true` | Existing write-column mapping respects the SDK field nullability. Added a real-table test of nullable key metadata, FE/BE table serialization, and NULL-key deduplication across commits through the Java reader. The cluster regression additionally checks NULL-key deduplication across commits through JNI, and checks a single-file table through both JNI and the actual Rust Reader (verified from the completed query profile). Multi-file primary-key merges retain the existing JNI fallback. Add Doris SQL coverage for NULL-safe MERGE UPDATE/DELETE on nullable single/composite keys, ordinary equality, INSERT branches, conditional priority, duplicate-match atomicity and private-marker name collisions. | | [`$file_indexes`](apache/paimon#9138) | Automatically discovered through the SDK registry. Preserve deferred catalog query checks and pin both backend payloads. FE scan-properties and actual JNI reconstruction tests cover denied authorization and snapshot 2 on disk while the catalog publishes only snapshot 1. | | [`latest-delta` batch startup mode](apache/paimon#9142) | Not exposed by this upgrade: reject it explicitly in `@options` instead of silently converting it to a full-snapshot read. A real three-snapshot test proves the difference (one delta row versus three full-snapshot rows). | | [Vector indexes](apache/paimon#8930) and [full-text indexes](apache/paimon#9031) on DV tables; [Multivalue array indexes](apache/paimon#9282); BTree TopN | New query acceleration needs Doris expression/search/TopN integration and relevant runtime dependencies and validation. Bumping the SDK does not enable these SQL capabilities. Existing reader selection remains conservative. | | [Arrow bundle writes](apache/paimon#9100) | An optional batching API, not a new `file.format=arrow` storage format. Doris keeps its current Arrow-to-Paimon-row writer; using the new bundle API is a separate performance change requiring memory/lifecycle validation and benchmarks. | | [SchemaManager interface](apache/paimon#9174) and [REST schema history APIs](apache/paimon#9673) | Updated fixtures to `FileSystemSchemaManager`. The REST additions inspect schema history; they do not replace the SDK table's filesystem schema manager. Doris does not call the new display APIs in this PR. | | Manifest/index metadata and Variant handling | Both Java endpoints use SDK 2.1.0; package and serialization tests passed. The scanner tests now have the same `java.nio` access as the BE JVM. The targeted Java, native and cluster checks below cover existing supported paths, but do not establish native/Rust compatibility for every newly introduced table option or file layout. | | BLOB partial updates and first-row/data-evolution improvements | Available upstream; the upgrade preserves Doris' existing write and reader eligibility constraints. New combinations still need external-table regression coverage before being advertised. | | [Removal of file-based privileges](apache/paimon#9186), arithmetic/cast fixes, raw physical-metadata restrictions | Actual behavior changes, described in the release note below; legacy privilege users must migrate before upgrading. | ### Release note Upgrade the Paimon Java SDK from 1.4.2 to 2.1.0. Fix NULL-safe MERGE matched UPDATE/DELETE silently omitting rows with NULL primary keys. Paimon 2.1 keeps wrapping integer `sum`/`product` overflow by default and supports per-field `fields.<field>.sum.fail-on-overflow` / `fields.<field>.product.fail-on-overflow` options for checked arithmetic. Timestamp-to-date casts before the Unix epoch now use the preceding calendar date. The SDK rejects raw `$files`, `$file_key_ranges`, `$binlog`, and `$statistics` tables on query-auth tables because column masks cannot be applied to their physical metadata. Doris now preserves query authorization and pins `$file_indexes` to the catalog-visible snapshot and explicitly rejects the unimplemented `latest-delta` OPTIONS mode instead of returning a full snapshot. Paimon's legacy file-based privilege system is no longer supported by the upstream SDK; deployments using it must migrate authorization before upgrading. ### Check List (For Author) - Test - [x] Regression test - [x] Unit Test - [x] Manual test - **Build:** FE/Java extensions and ASAN BE passed after rebasing onto master `5e3ed84abb0`; both Java endpoints package SDK 2.1.0. All 9 JNI plugins passed layout checks. - **Unit tests:** FE connector 844 passed, 1 live-connectivity test skipped; Java scanner 175 passed; native Paimon/JNI/Rust 144 passed; S3 shade 1 passed. The MERGE follow-up passed 38 related FE tests. - **Cluster regression:** 51 Paimon suites passed after rebase; the MERGE follow-up passed 9 targeted suites, including the new nullable-key regression. The opt-in KEY_DYNAMIC resource stress suite was skipped. System-table expected output was regenerated with the runner and replayed successfully. - **Backward reads:** Paimon 1.4.2 append/PK data matched its Spark oracle again; completed profiles confirmed Rust append reads and JNI fallback for multi-file PK merges. Scope: S3/filesystem Paimon catalog. File cache was disabled for a local Btrfs inode-stat issue, and the host swap startup check was skipped. Paimon HMS/REST catalogs and mixed-SDK rolling upgrades were not validated. - Behavior changed: - [ ] No. - [x] Yes. Uses Paimon 2.1.0 SDK behavior, including configurable integer overflow checks, corrected pre-epoch timestamp-to-date casts, removal of upstream file-based privileges, snapshot-safe `$file_indexes`, and explicit rejection of unsupported `latest-delta` OPTIONS reads. - Does this need documentation? - [x] No. Dependency upgrade and upstream behavior changes are recorded in the release note. - [ ] Yes. ### Self-review - Validation follow-up scope: fix nullable-key MERGE target-presence detection, then preserve deferred `$file_indexes` authorization and its JNI source snapshot pin, adapt timestamp-policy validation and callbacks to SDK 2.1, and refresh affected system-table expected output through the regression runner. - Goal and scope: shared SDK upgrade plus directly affected API/behavior adaptations. New search and batching features remain separate work; no new connector SPI or native ABI is introduced. - Correctness and parallel paths: FE binding, serialized BE system-table reconstruction, JNI SDK behavior, and reader selection were inspected. `$file_indexes` preserves deferred catalog authorization and carries the snapshot pin through both FE/BE payloads; timestamp policies validate and execute against repaired precision; MERGE uses INNER JOIN semantics or a null-extended target marker rather than testing a nullable key, and user expressions retain their original binding scope; both OPTIONS resolution and statement-fence pinning reject `latest-delta`. - Concurrency and lifecycle: production adaptations add no threads, locks, shared mutable state, native allocations, or resource owners. Java fixtures close their catalog/writer/commit/reader resources; the new cluster suite restores modified session variables in `finally` and preserves tables for debugging. The existing writer-lifecycle regression passed 120 successive inserts and verified compaction writer threads return to zero after each phase. - Performance: reuse the existing row repair and SDK policy evaluation; bind source snapshots during FE planning. MERGE adds one constant target projection only when INSERT branches need unmatched rows. No performance improvement is claimed. - Compatibility and configuration: upstream file privileges are removed, and mixed SDK rolling upgrades remain unverified. No configuration keys, Thrift/Protobuf definitions, new FE/BE variables, or persistence formats are added by Doris. Storage access for `$file_indexes` uses the existing configured catalog endpoint and base-table SELECT privilege; there is no new artifact-download property. - Tests and results: FE scan-properties tests cover denied `$file_indexes` authorization and catalog-published snapshot bounds; an actual serialized JNI reconstruction test covers the second payload. Serialized timestamp-policy tests retain row filters, masking, fallback and nested/hidden-column coverage. MERGE tests cover nullable single/composite keys, ordinary and NULL-safe equality, branch priority, duplicate-match rejection without row changes, and same-named user columns; the new golden is generated and replayed by the regression runner. The system-table golden now includes SDK 2.1's `operation` and `writer_version` fields. Builds, unit tests, cluster replay and legacy-data reads passed after rebase; limits are listed above. - Other CI failures: the P0 view case passed in isolation; it shares and drops `v_distinct_agg_rewrite` with `test_mtmv` in the same database. The Iceberg failure was reproduced as `DESC digest` expecting nullable `Yes` but returning `No`: [master's source-nullability change](apache@c7ffbda3877) predates the [test's old expectation](apache@e83b06cb7b7). Those Iceberg and P0 files are unchanged from the base; no unrelated golden was modified. - Independent optimizer limitation: a one-row constant source with multiple NULL-safe join keys can become an empty relation even when an internal OLAP table has a matching NULL row. This also reproduces in an ordinary SELECT on an internal table; optimizer files are unchanged by this PR. The composite-key DELETE regression uses a multi-row source with an unmatched control. That standalone optimizer defect remains outside this SDK adaptation. - Transactions, writes and observability: no transaction/recovery implementation is changed. The transaction regression confirms an oversized failed insert publishes neither rows nor a snapshot. Completed query profiles prove Rust selection and JNI fallback, rather than relying only on enable flags. Unsupported delta mode fails with an actionable diagnostic; existing system-table planning diagnostics apply to snapshot pinning. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label
1 parent f2117db commit 949a806

43 files changed

Lines changed: 860 additions & 591 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎fe/be-java-extensions/paimon-scanner/pom.xml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,9 @@ under the License.
471471
<plugin>
472472
<artifactId>maven-surefire-plugin</artifactId>
473473
<configuration>
474+
<!-- Paimon 2.1 reads Variant values through ByteBuffer views. Match the
475+
java.nio access already enabled by bin/start_be.sh for the BE JVM. -->
476+
<argLine>--add-opens=java.base/java.nio=ALL-UNNAMED @{argLine}</argLine>
474477
<classpathDependencyExcludes>
475478
<classpathDependencyExclude>
476479
org.apache.logging.log4j:log4j-core

‎fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonJniScanner.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,8 +968,8 @@ private static Table applyManifestParallelismBound(
968968
if (normalized == wrapped) {
969969
return table;
970970
}
971-
// FE planning already enforced privilege delegates. Keeping one here would hide the
972-
// fallback tree and force a single copied cap onto branches with independent values.
971+
// An outer delegate would hide the fallback tree and force a single copied cap onto
972+
// branches with independent values.
973973
return normalized;
974974
}
975975

@@ -1039,7 +1039,7 @@ static boolean isWrappedFirst(FallbackReadFileStoreTable table) {
10391039
private static FileStoreTable unwrapSystemPlanningSource(FileStoreTable table) {
10401040
FileStoreTable current = table;
10411041
// System wrappers dispatch fallback reads only when the fallback pair is their direct
1042-
// source; FE authorization has already run, so privilege-only delegates must not hide it.
1042+
// source; outer delegates must not hide the fallback pair from the system wrapper.
10431043
while (current instanceof DelegatedFileStoreTable
10441044
&& !(current instanceof FallbackReadFileStoreTable)) {
10451045
current = ((DelegatedFileStoreTable) current).wrapped();

‎fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonTimestampQueryAuth.java‎

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,30 @@ static RecordReader<InternalRow> projectOutput(RecordReader<InternalRow> reader,
146146

147147
@Override
148148
public RecordReader<InternalRow> doAuth(RecordReader<InternalRow> reader, RowType readType) {
149-
// Delegate the policy itself to Paimon; neither filters nor masks are dropped or rewritten.
149+
return doAuth(reader, readType, original.extractPredicate(), original.extractColumnMasking());
150+
}
151+
152+
@Override
153+
public void validateReadType(RowType tableType, RowType readType, Set<String> ruleFields,
154+
Set<String> resolvedBlobViewFields) {
155+
// The physical p9 request preserves historical fractions; policies see current precision.
156+
// Keep the SDK's schema and blob-view checks against the type actually passed to doAuth.
157+
original.validateReadType(tableType, currentReadType.project(readType.getFieldNames()),
158+
ruleFields, resolvedBlobViewFields);
159+
}
160+
161+
@Override
162+
public RecordReader<InternalRow> doAuth(RecordReader<InternalRow> reader, RowType readType,
163+
Predicate rowFilter, Map<String, Transform> selectedColumnMasking) {
164+
// Paimon 2.1 ReadTransform calls this overload with only the masks active for this read.
165+
// Repair before applying either rule, and preserve that selection when delegating.
150166
// System-table readers synthesize fields such as rowkind only after this inner callback.
151167
RowType currentDataType = currentReadType.project(readType.getFieldNames());
152168
if (readType.equals(currentDataType)) {
153-
return original.doAuth(reader, readType);
169+
return original.doAuth(reader, readType, rowFilter, selectedColumnMasking);
154170
}
155-
return original.doAuth(reader.transform(row -> repairRow(row, readType, currentDataType)), currentDataType);
171+
return original.doAuth(reader.transform(row -> repairRow(row, readType, currentDataType)),
172+
currentDataType, rowFilter, selectedColumnMasking);
156173
}
157174

158175
static InternalRow repairRow(InternalRow row, RowType readType, RowType currentType) {

‎fe/be-java-extensions/paimon-scanner/src/test/java/org/apache/doris/paimon/PaimonArrowBatchAdapterTest.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import org.apache.paimon.data.variant.GenericVariant;
4242
import org.apache.paimon.data.variant.Variant;
4343
import org.apache.paimon.fs.local.LocalFileIO;
44-
import org.apache.paimon.schema.SchemaManager;
44+
import org.apache.paimon.schema.FileSystemSchemaManager;
4545
import org.apache.paimon.table.FileStoreTableFactory;
4646
import org.apache.paimon.table.Table;
4747
import org.apache.paimon.table.sink.BatchTableCommit;
@@ -263,7 +263,7 @@ public void testPrecisionSevenAndEightKeysRoundTrip(@TempDir Path dir)
263263
.column("ts", DataTypes.TIMESTAMP(precision).notNull())
264264
.column("detail", DataTypes.ROW(DataTypes.FIELD(0, "t", DataTypes.TIMESTAMP(precision))))
265265
.primaryKey("ts").option("bucket", "1").option("file.format", format).build();
266-
new SchemaManager(fileIO, path).createTable(schema);
266+
new FileSystemSchemaManager(fileIO, path).createTable(schema);
267267
Table table = FileStoreTableFactory.create(fileIO, path);
268268
PaimonWriteSchema writeSchema = PaimonWriteSchema.create(table.rowType(), new String[] {"ts", "detail"});
269269
BatchWriteBuilder builder = table.newBatchWriteBuilder();

‎fe/be-java-extensions/paimon-scanner/src/test/java/org/apache/doris/paimon/PaimonJniScannerTest.java‎

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,9 @@
2929
import org.apache.paimon.disk.IOManager;
3030
import org.apache.paimon.disk.IOManagerImpl;
3131
import org.apache.paimon.fs.local.LocalFileIO;
32-
import org.apache.paimon.privilege.PrivilegeChecker;
33-
import org.apache.paimon.privilege.PrivilegedFileStoreTable;
3432
import org.apache.paimon.reader.RecordReader;
3533
import org.apache.paimon.schema.TableSchema;
3634
import org.apache.paimon.table.ChainGroupReadTable;
37-
import org.apache.paimon.table.DelegatedFileStoreTable;
3835
import org.apache.paimon.table.FallbackReadFileStoreTable;
3936
import org.apache.paimon.table.FileStoreTable;
4037
import org.apache.paimon.table.FileStoreTableFactory;
@@ -503,6 +500,63 @@ public void testOldFeSerializedSystemSourceRejectsFallbackZeroReadBatch() throws
503500
.contains(CoreOptions.READ_BATCH_SIZE.key()));
504501
}
505502

503+
@Test
504+
public void testSerializedFileIndexesSourceKeepsSnapshotDuringJniRebuild() throws Exception {
505+
org.apache.doris.jni.spi.utils.OffHeap.setTesting();
506+
try (org.apache.paimon.catalog.Catalog catalog = new org.apache.paimon.catalog.FileSystemCatalog(
507+
LocalFileIO.create(), new org.apache.paimon.fs.Path(temporaryFolder.toUri()))) {
508+
catalog.createDatabase("db", false);
509+
Identifier id = Identifier.create("db", "indexed");
510+
catalog.createTable(id, org.apache.paimon.schema.Schema.newBuilder().column("id", DataTypes.INT())
511+
.option("bucket", "-1").option("write-only", "true")
512+
.option("file-index.bitmap.columns", "id").build(), false);
513+
FileStoreTable source = (FileStoreTable) catalog.getTable(id);
514+
for (int value = 1; value <= 2; value++) {
515+
org.apache.paimon.table.sink.BatchWriteBuilder builder = source.newBatchWriteBuilder();
516+
try (org.apache.paimon.table.sink.BatchTableWrite write = builder.newWrite()) {
517+
write.write(org.apache.paimon.data.GenericRow.of(value));
518+
try (org.apache.paimon.table.sink.BatchTableCommit commit = builder.newCommit()) {
519+
commit.commit(write.prepareCommit());
520+
}
521+
}
522+
}
523+
Table system = SystemTableLoader.load("file_indexes", source);
524+
org.apache.paimon.table.source.Split split = system.newReadBuilder().newScan().plan().splits().get(0);
525+
// The unpinned control proves two index files exist; only the transported source pins JNI.
526+
for (boolean pinned : new boolean[] {false, true}) {
527+
FileStoreTable transported = pinned ? source.copyWithoutTimeTravel(
528+
Collections.singletonMap(CoreOptions.SCAN_SNAPSHOT_ID.key(), "1")) : source;
529+
Map<String, String> params = createBaseParams();
530+
params.put("required_fields", "file_path");
531+
params.put("columns_types", "string");
532+
params.put("time_zone", "UTC");
533+
params.put(SERIALIZED_TABLE_CACHE_KEY, "file-index-pin-" + pinned);
534+
params.put(SERIALIZED_TABLE, encodePaimonObject(system));
535+
params.put(SERIALIZED_SYSTEM_SOURCE, encodePaimonObject(transported));
536+
params.put("paimon.doris.system-table-type", "file_indexes");
537+
params.put("paimon." + PaimonJniScanner.DORIS_MANIFEST_PARALLELISM_CAP, "2");
538+
params.put("paimon_split", encodePaimonObject(split));
539+
params.put("paimon_predicate", encodePaimonObject(Collections.emptyList()));
540+
PaimonJniScanner scanner = new PaimonJniScanner(16, params);
541+
try {
542+
scanner.open();
543+
int rows = 0;
544+
while (scanner.getNextBatchMeta() != 0) {
545+
rows += scanner.getTable().getNumRows();
546+
scanner.releaseTable();
547+
}
548+
Assertions.assertEquals(pinned ? 1 : 2, rows);
549+
} finally {
550+
scanner.close();
551+
}
552+
}
553+
}
554+
}
555+
556+
private static String encodePaimonObject(Object value) throws Exception {
557+
return Base64.getUrlEncoder().withoutPadding().encodeToString(InstantiationUtil.serializeObject(value));
558+
}
559+
506560
@Test
507561
public void testBackendManifestCapReachesHiddenFallbackPlanner() {
508562
FileStoreTable main = serializableFileStoreTable(Collections.emptyMap());
@@ -636,34 +690,6 @@ public void testFallbackManifestParallelismIsCappedPerBranch() {
636690
.get(CoreOptions.SCAN_MANIFEST_PARALLELISM.key()));
637691
}
638692

639-
@Test
640-
public void testBackendCapTraversesPrivilegeDelegate() {
641-
FileStoreTable main = serializableFileStoreTable(Collections.singletonMap(
642-
CoreOptions.SCAN_MANIFEST_PARALLELISM.key(), "1"));
643-
FileStoreTable fallback = serializableFileStoreTable(Collections.singletonMap(
644-
CoreOptions.SCAN_MANIFEST_PARALLELISM.key(), "128"));
645-
PrivilegeChecker checker = (PrivilegeChecker) Proxy.newProxyInstance(
646-
PrivilegeChecker.class.getClassLoader(),
647-
new Class<?>[] {PrivilegeChecker.class},
648-
(proxy, method, args) -> null);
649-
FileStoreTable privileged = PrivilegedFileStoreTable.wrap(
650-
new FallbackReadFileStoreTable(main, fallback, true), checker,
651-
Identifier.create("db", "table"));
652-
653-
Table safe = PaimonJniScanner.applyBackendManifestParallelism(
654-
privileged, null, 64);
655-
FileStoreTable planningTable = safe instanceof DelegatedFileStoreTable
656-
&& !(safe instanceof FallbackReadFileStoreTable)
657-
? ((DelegatedFileStoreTable) safe).wrapped() : (FileStoreTable) safe;
658-
659-
Assertions.assertTrue(planningTable instanceof FallbackReadFileStoreTable);
660-
FallbackReadFileStoreTable pair = (FallbackReadFileStoreTable) planningTable;
661-
Assertions.assertEquals("1", pair.wrapped().options()
662-
.get(CoreOptions.SCAN_MANIFEST_PARALLELISM.key()));
663-
Assertions.assertEquals("64", pair.other().options()
664-
.get(CoreOptions.SCAN_MANIFEST_PARALLELISM.key()));
665-
}
666-
667693
@Test
668694
public void testFallbackWrapperOrderMatchesPaimonFactoryPrecedence() {
669695
// Capping a fallback pair rebuilds the wrapper, and Paimon has no accessor for its read order,
@@ -708,29 +734,6 @@ public void testOldFeSystemWrapperPreservesIndependentFallbackLimits() throws Ex
708734
.get(CoreOptions.SCAN_MANIFEST_PARALLELISM.key()));
709735
}
710736

711-
@Test
712-
public void testSystemWrapperExposesSafeFallbackBehindPrivilegeDelegate() throws Exception {
713-
FileStoreTable main = serializableFileStoreTable(Collections.singletonMap(
714-
CoreOptions.SCAN_MANIFEST_PARALLELISM.key(), "1"));
715-
FileStoreTable fallback = serializableFileStoreTable(Collections.singletonMap(
716-
CoreOptions.SCAN_MANIFEST_PARALLELISM.key(), "2"));
717-
PrivilegeChecker checker = (PrivilegeChecker) Proxy.newProxyInstance(
718-
PrivilegeChecker.class.getClassLoader(),
719-
new Class<?>[] {PrivilegeChecker.class},
720-
(proxy, method, args) -> null);
721-
FileStoreTable privileged = PrivilegedFileStoreTable.wrap(
722-
new FallbackReadFileStoreTable(main, fallback, true), checker,
723-
Identifier.create("db", "table"));
724-
Table wrapper = SystemTableLoader.load("partitions", privileged);
725-
726-
Table safe = PaimonJniScanner.applyBackendManifestParallelism(
727-
wrapper, null, 64);
728-
Field storeTable = safe.getClass().getDeclaredField("storeTable");
729-
storeTable.setAccessible(true);
730-
731-
Assertions.assertTrue(storeTable.get(safe) instanceof FallbackReadFileStoreTable);
732-
}
733-
734737
@Test
735738
public void testBackendCapRebuildsWrapperFromTransportedSystemSource() throws Exception {
736739
FileStoreTable source = serializableFileStoreTable(Collections.singletonMap(
@@ -1282,6 +1285,9 @@ public Object invoke(Object proxy, Method method, Object[] args) {
12821285
if ("options".equals(method.getName())) {
12831286
return options;
12841287
}
1288+
if ("coreOptions".equals(method.getName())) {
1289+
return CoreOptions.fromMap(options);
1290+
}
12851291
if ("rowType".equals(method.getName())) {
12861292
return new RowType(Collections.emptyList());
12871293
}

0 commit comments

Comments
 (0)