You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "wuchong (via GitHub)" <gi...@apache.org> on 2025/12/25 09:37:12 UTC

Re: [PR] Support COMPACTED format for log tables [fluss]

wuchong commented on code in PR #1605:
URL: https://github.com/apache/fluss/pull/1605#discussion_r2646794105


##########
fluss-client/src/main/java/org/apache/fluss/client/write/WriteRecord.java:
##########
@@ -127,6 +127,25 @@ public static WriteRecord forArrowAppend(
                 estimatedSizeInBytes);
     }
 
+    /** Creates a write record for append operation for Compacted format. */
+    public static WriteRecord forCompactedAppend(
+            TableInfo tableInfo,
+            PhysicalTablePath tablePath,
+            CompactedRow row,
+            @Nullable byte[] bucketKey) {
+        checkNotNull(row);
+        int estimatedSizeInBytes = CompactedLogRecord.sizeOf(row) + RECORD_BATCH_HEADER_SIZE;

Review Comment:
   This `RECORD_BATCH_HEADER_SIZE` is for kv record batch, we should use `LogRecordBatchFormat.recordBatchHeaderSize(CURRENT_LOG_MAGIC_VALUE)`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org