Commit f1d6691
committed
Optimize OrcWriter: precompute varlena indices to skip invalid loops
Reduces per-tuple branching and cache touches, especially on schemas with many fixed-length/byval columns
1. Add OrcWriter member: std::vector<int> varlena_slowpath_indices_
2. Precompute non-byval, typlen == -1 (varlena) column indices in constructor from tuple_desc
3. Update PrepareWriteTuple to iterate only precomputed indices, skipping fixed-length and byval columns1 parent 0cd5c60 commit f1d6691
2 files changed
Lines changed: 15 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
252 | 262 | | |
253 | 263 | | |
254 | 264 | | |
| |||
311 | 321 | | |
312 | 322 | | |
313 | 323 | | |
314 | | - | |
315 | | - | |
316 | 324 | | |
317 | 325 | | |
318 | 326 | | |
| |||
323 | 331 | | |
324 | 332 | | |
325 | 333 | | |
326 | | - | |
| 334 | + | |
327 | 335 | | |
328 | 336 | | |
329 | | - | |
330 | | - | |
331 | 337 | | |
332 | 338 | | |
333 | 339 | | |
334 | 340 | | |
335 | 341 | | |
336 | 342 | | |
337 | | - | |
| 343 | + | |
338 | 344 | | |
339 | 345 | | |
340 | 346 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
141 | 144 | | |
142 | 145 | | |
143 | 146 | | |
| |||
0 commit comments