io.SinkChange
What a sink writes for one state of its node: the change since the
Usage
io.SinkChange(
view,
contract,
schema,
change,
)state it wrote last, or the whole table.
The tables are built when first used, so a sink that reads only inserts and deletes does not build table.
Attributes
contract-
What to record with the write (Contract): the node, the plan, the source versions and what the node proved about every row.
contract.epochgrows with every state; a sink that stores it can tell the state it holds (Sink.contract). schema-
The table’s schema: the node’s columns, NOT NULL where the node proves it.
replace- True if the sink’s contents must be replaced by table: the first write, contents this process did not write, or contents another plan wrote. Then inserts is table and deletes is empty.
Attributes
| Name | Description |
|---|---|
| change | The weighted change from the state written last to this one |
| deletes | The rows to remove, one copy each (with replace, none). |
| inserts | The rows to add (with replace, every row). |
| native | The state and the change as tables DuckDB holds, when the view |
| table | The node’s whole state. |
change
The weighted change from the state written last to this one
change: pa.Table
(sverify._weighted): the copies each row gains or loses, as the view’s changes since then add up.
deletes
The rows to remove, one copy each (with replace, none).
deletes: pa.Table
inserts
The rows to add (with replace, every row).
inserts: pa.Table
native
The state and the change as tables DuckDB holds, when the view
native: tuple[Resident, Resident] | None
keeps its state in DuckDB (sverify._state.DuckDBStore): the new state’s rows (a DuckDB view), and the weighted change since the state written last (with replace, the whole state), computed by the view’s merge plan in DuckDB. None otherwise: write the Arrow tables.
table
The node’s whole state.
table: pa.Table