wzhero1 commented on code in PR #6858:
URL: https://github.com/apache/paimon/pull/6858#discussion_r2652137059


##########
paimon-core/src/main/java/org/apache/paimon/table/system/AuditLogTable.java:
##########
@@ -696,17 +666,24 @@ public RecordReader<InternalRow> createReader(Split 
split) throws IOException {
             return dataRead.createReader(split).transform(this::convertRow);
         }
 
-        private InternalRow convertRow(InternalRow data) {
-            return new AuditLogRow(readProjection, data);
+        private InternalRow convertRow(InternalRow row) {
+            row.setRowKind(org.apache.paimon.types.RowKind.INSERT);
+            // Fallback for append-only tables: rowkind field is null, wrap to 
return "+I"

Review Comment:
   There are two distinct concepts here:
   
   1. **Row's metadata** `rowKind` (`row.setRowKind(...)`) - This is always 
`INSERT` for both pk and ap tables when reading from `AuditLogTable`。
   2. The `rowKind` column field (the regular column in schema) - For pk 
tables, this is already populated by `KeyValueTableRead`. For ap tables, this 
column needs explicit filling since the underlying data doesn't carry this 
information.
   The if condition below handles case2 specifically for ap tables.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to