Skip to content

Commit c831cf4

Browse files
committed
address comments
1 parent bf46340 commit c831cf4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fluss-lake/fluss-lake-paimon/src/main/java/com/alibaba/fluss/lake/paimon/tiering/FlussRecordAsPaimonRow.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
/** To wrap Fluss {@link LogRecord} as paimon {@link InternalRow}. */
3737
public class FlussRecordAsPaimonRow implements InternalRow {
3838

39+
// Lake table for paimon will append three system columns: __bucket, __offset,__timestamp
40+
private static final int LAKE_PAIMON_SYSTEM_COLUMNS = 3;
3941
private final RowType tableTowType;
4042
private final int bucket;
4143
private LogRecord logRecord;
@@ -52,7 +54,7 @@ public void setFlussRecord(LogRecord logRecord) {
5254
this.internalRow = logRecord.getRow();
5355
this.originRowFieldCount = internalRow.getFieldCount();
5456
checkState(
55-
originRowFieldCount == tableTowType.getFieldCount(),
57+
originRowFieldCount == tableTowType.getFieldCount() - LAKE_PAIMON_SYSTEM_COLUMNS,
5658
"The paimon table fields count must equals to LogRecord's fields count.");
5759
}
5860

@@ -61,7 +63,7 @@ public int getFieldCount() {
6163
return
6264
// business (including partitions) + system (three system fields: bucket, offset,
6365
// timestamp)
64-
originRowFieldCount + 3;
66+
originRowFieldCount + LAKE_PAIMON_SYSTEM_COLUMNS;
6567
}
6668

6769
@Override

0 commit comments

Comments
 (0)