Commit 264cfea
committed
sinks: skip gratuitous key clones on the hot DiffPair path
Two changes to remove per-DiffPair Row clones that showed up as an Iceberg
perf regression in the feature benchmark:
1. Iceberg walker emits None for the key unconditionally. write_data_files
destructures the key as _row on both the stash and drain paths and never
uses it; the PK warner still sees the real key before we replace it with
None, so violation detection is unchanged. Removes one Row clone per
DiffPair.
2. PkViolationWarner stores Row::hashed() (u64) instead of a cloned
Option<Row> to identify the current group. A hash collision could mask
a single PK violation but this is a purely diagnostic code path, so
the trade-off is acceptable. Removes another Row clone per group
transition — which for snapshot workloads with unique keys is every
DiffPair.1 parent 6f8b1e4 commit 264cfea
2 files changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
161 | 166 | | |
162 | 167 | | |
163 | 168 | | |
164 | 169 | | |
165 | | - | |
| 170 | + | |
166 | 171 | | |
167 | 172 | | |
168 | 173 | | |
| |||
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
188 | 194 | | |
189 | 195 | | |
190 | | - | |
| 196 | + | |
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2444 | 2444 | | |
2445 | 2445 | | |
2446 | 2446 | | |
2447 | | - | |
2448 | | - | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
| 2450 | + | |
2449 | 2451 | | |
2450 | 2452 | | |
2451 | 2453 | | |
| |||
0 commit comments