You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plans/emitter.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -162,8 +162,8 @@ non-nullable by construction, encoded in `TableEncoder::new`:
162
162
|---|---|---|
163
163
|`_lsn`|`UInt64`| source commit-record LSN. `ReplacingMergeTree(_lsn)` keys dedup on this so restart-and-replay window collapses re-emitted rows to latest LSN per PK |
164
164
|`_xid`|`UInt32`| source xid. Lets analytic queries group all rows from one xact, recover xact boundary CH lost when emitter serialised across tables |
165
-
|`_op`|`Enum8('insert'=1,'update'=2,'delete'=3)`| row-op classification. CH-side `WHERE _op != 3` is the cheap "live rows" filter; HOT_UPDATE collapses to UPDATE (code 2), PG-internal distinction doesn't reach CH |
166
165
|`_commit_ts`|`DateTime64(6, 'UTC')`| xact commit timestamp, shifted from PG's 2000-01-01 epoch to Unix via `DATETIME64_PG_EPOCH_US`|
166
+
|`_is_deleted`|`Bool`| 1 on delete, else 0. `Bool` is `UInt8` underneath (1 wire byte), so it satisfies `ReplacingMergeTree`'s `is_deleted` UInt8 requirement. `ReplacingMergeTree(_lsn, _is_deleted)` second arg collapses deletes on FINAL; `WHERE _is_deleted = 0` is the cheap "live rows" filter. `soft_delete` keeps it out of the engine args to retain tombstones |
167
167
168
168
`_lsn` is dedup key because emitter ack lags actual CH durability by up
169
169
to one flush window. On restart cursor's `emitter_ack_lsn` rewinds to
0 commit comments