diff --git a/paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java b/paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java index 34aab1b767ba..f2a964bae16a 100644 --- a/paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java +++ b/paimon-core/src/main/java/org/apache/paimon/mergetree/MergeTreeWriter.java @@ -96,8 +96,6 @@ public MergeTreeWriter( long maxSequenceNumber, Comparator keyComparator, MergeFunction mergeFunction, - RowType keyType, - RowType valueType, KeyValueFileWriterFactory writerFactory, boolean commitForceCompact, ChangelogProducer changelogProducer, @@ -108,8 +106,8 @@ public MergeTreeWriter( this.sortMaxFan = sortMaxFan; this.sortCompression = sortCompression; this.ioManager = ioManager; - this.keyType = keyType; - this.valueType = valueType; + this.keyType = writerFactory.keyType(); + this.valueType = writerFactory.valueType(); this.compactManager = compactManager; this.newSequenceNumber = maxSequenceNumber + 1; this.keyComparator = keyComparator; diff --git a/paimon-core/src/main/java/org/apache/paimon/operation/KeyValueFileStoreWrite.java b/paimon-core/src/main/java/org/apache/paimon/operation/KeyValueFileStoreWrite.java index 05bf5797e050..d061e181618b 100644 --- a/paimon-core/src/main/java/org/apache/paimon/operation/KeyValueFileStoreWrite.java +++ b/paimon-core/src/main/java/org/apache/paimon/operation/KeyValueFileStoreWrite.java @@ -220,8 +220,6 @@ protected MergeTreeWriter createWriter( restoredMaxSeqNumber, keyComparator, mfFactory.create(), - keyType, - valueType, writerFactory, options.commitForceCompact(), options.changelogProducer(), diff --git a/paimon-core/src/test/java/org/apache/paimon/mergetree/MergeTreeTestBase.java b/paimon-core/src/test/java/org/apache/paimon/mergetree/MergeTreeTestBase.java index 727f684801ff..35287ae778c8 100644 --- a/paimon-core/src/test/java/org/apache/paimon/mergetree/MergeTreeTestBase.java +++ b/paimon-core/src/test/java/org/apache/paimon/mergetree/MergeTreeTestBase.java @@ -514,8 +514,6 @@ private MergeTreeWriter createMergeTreeWriter( maxSequenceNumber, comparator, DeduplicateMergeFunction.factory().create(), - writerFactory.keyType(), - writerFactory.valueType(), writerFactory, options.commitForceCompact(), changelogProducer,