![]() |
Signet Forge 0.1.0
C++20 Parquet library with AI-native extensions
|
DEMO |
Per-row lineage tracking inspired by Iceberg V3-style data governance. More...
#include <row_lineage.hpp>
Classes | |
| struct | RowLineage |
| Lineage metadata for a single row. More... | |
Public Member Functions | |
| RowLineageTracker (const std::string &origin_file="", int32_t initial_version=1) | |
| Construct a tracker for the given origin file and initial version. | |
| RowLineage | next (const uint8_t *row_data, size_t row_size) |
| Generate lineage for the next row. | |
| int64_t | current_row_id () const noexcept |
| Get current row counter (next row_id to be assigned). | |
| void | reset (const std::string &origin_file, int32_t version=1) |
| Reset the origin file and version for a new batch. | |
Per-row lineage tracking inspired by Iceberg V3-style data governance.
Generates monotonic row IDs, tracks mutation versions, records origin file/batch identifiers, and maintains a SHA-256 per-row hash chain for tamper-evident ordering. This extends the batch-level audit chain (audit_chain.hpp) to row granularity.
Row IDs are monotonically increasing and never reset, even across batches. The hash chain is also continuous across reset() calls.
Definition at line 46 of file row_lineage.hpp.
|
inlineexplicit |
Construct a tracker for the given origin file and initial version.
| origin_file | Source file/batch identifier (stored in each RowLineage). |
| initial_version | Starting mutation version counter. |
| std::runtime_error | if the commercial license is required but missing. |
Definition at line 61 of file row_lineage.hpp.
|
inlinenoexcept |
Get current row counter (next row_id to be assigned).
Definition at line 97 of file row_lineage.hpp.
|
inline |
Generate lineage for the next row.
row_data is the serialized row bytes used to compute the per-row hash chain.
Definition at line 77 of file row_lineage.hpp.
|
inline |
Reset the origin file and version for a new batch.
Row ID is NOT reset (monotonic across batches). Hash chain is NOT reset (chain continuity is preserved).
| origin_file | New source file/batch identifier. |
| version | New mutation version counter. |
Definition at line 106 of file row_lineage.hpp.