diff --git a/paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileWriterFactory.java b/paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileWriterFactory.java index 2e25c4b1e539..87f53ab5b013 100644 --- a/paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileWriterFactory.java +++ b/paimon-core/src/main/java/org/apache/paimon/io/KeyValueFileWriterFactory.java @@ -196,14 +196,12 @@ private Builder( public KeyValueFileWriterFactory build( BinaryRow partition, int bucket, CoreOptions options) { - RowType finalKeyType = options.thinMode() ? RowType.of() : keyType; - RowType writeKeyType = KeyValue.schema(finalKeyType, valueType); WriteFormatContext context = new WriteFormatContext( partition, bucket, keyType, - writeKeyType, + KeyValue.schema(options.thinMode() ? RowType.of() : keyType, valueType), fileFormat, format2PathFactory, options);