AI / Apache Paimon Interview questions
What is the difference between the audit_log and binlog system tables?
Both expose row-level change information, but they differ in shape and intended consumer:
| System table | Shape | Best for |
| $audit_log | One row per change event, with a single added rowkind column (+I/-U/+U/-D). | General auditing and debugging where you want to filter or count changes by type in plain SQL. |
| $binlog | Groups related before/after values together in a MySQL-binlog-like structure, with array-typed columns for old and new values. | Downstream systems specifically expecting a MySQL-binlog-shaped change stream, easing integration with binlog-consuming tools. |
SELECT * FROM my_table$audit_log; SELECT * FROM my_table$binlog;
Reach for $audit_log as the general-purpose option for SQL-based change auditing; reach for $binlog specifically when a consumer downstream is already wired to expect binlog-style output and you don't want to reshape the data yourself.
More Related questions...