wzhero1 commented on code in PR #6933:
URL: https://github.com/apache/paimon/pull/6933#discussion_r2680962566
##########
paimon-core/src/main/java/org/apache/paimon/table/system/AuditLogTable.java:
##########
@@ -87,25 +87,37 @@
public class AuditLogTable implements DataTable, ReadonlyTable {
public static final String AUDIT_LOG = "audit_log";
+ public static final String AUDIT_LOG_ENABLED = "audit.log.enabled";
- public static final PredicateReplaceVisitor PREDICATE_CONVERTER =
- p -> {
- if (p.index() == 0) {
- return Optional.empty();
- }
- return Optional.of(
- new LeafPredicate(
- p.function(),
- p.type(),
- p.index() - 1,
- p.fieldName(),
- p.literals()));
- };
+ protected final FileStoreTable wrapped;
- private final FileStoreTable wrapped;
+ /** Number of special fields (rowkind, and optionally _SEQUENCE_NUMBER). */
+ protected final int specialFieldCount;
public AuditLogTable(FileStoreTable wrapped) {
this.wrapped = wrapped;
+ this.wrapped.schema().options().put(AUDIT_LOG_ENABLED, "true");
Review Comment:
Done. The parameters are now aggregated and updated in `AuditLogTable`, and
`ValueContentRowDataRecordIterator` is only aware of the
`addSequenceNumberFirst` behavior.
The current parameter is `AUDIT_ADD_SEQUENCE_NUMBER_FIRST`, which clearly
reflects what it does (the naming can be discussed further, but it's an
internal parameter so it's easy to adjust).
--
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]