feat(datafusion): support the $audit_log system table - #787
Draft
jerry-024 wants to merge 3 commits into
Draft
Conversation
jerry-024
marked this pull request as draft
September 3, 2026 07:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add Paimon Java-compatible support for querying the
$audit_logsystem table from DataFusion and the core read API.The table exposes each row's physical row kind and, when enabled in the persisted table options, its sequence number. It preserves current-state merge semantics for primary-key tables instead of dropping winning retract rows.
Brief change log
<table>$audit_login the DataFusion system-table loader.rowkindas the first column and optional_SEQUENCE_NUMBERafter it.ignore-deletebehavior.table-read.sequence-number.enabled, matching Paimon Java; persisted table configuration remains supported.Tests
cargo +1.94.0 test -p paimon --test audit_log_table_test— 19 passedcargo +1.94.0 test -p paimon-datafusion --test system_tables— 20 passedcargo +1.94.0 clippy -p paimon-datafusion --lib --test system_tables -- -D warningscargo fmt --allgit diff --checkCoverage includes append-only and primary-key row kinds, sequence numbers, merge engines,
ignore-delete, projection/filter/limit behavior, dynamic time travel and authorization, deletion vectors, and Java-compatible dynamic-option validation.API and Format
Adds the
$audit_logsystem-table API and core audit-read support. No existing API is removed or changed incompatibly.No storage-format change is introduced; existing Paimon data files, manifests, deletion vectors, and table options remain compatible.
Documentation
Updated
docs/src/sql.mdwith$audit_logschema, query examples, row-kind semantics, sequence-number behavior, and deletion-vector visibility.