Repository navigation
Commit 11a2544
ORC-1170: [C++] Optimize the RowReader::seekToRow function in the case of seeking within the same stripe
### What changes were proposed in this pull request?
The patch will optimize the seekToRow function. The RowReader::seekToRow() function always call startNextStripe() to seek to the beginning of target stripe. However, when PPD is enabled many calls are still staying in the same stripe which results in many unnecessary calls.
### Why are the changes needed?
This PR improves the seekToRow function call. I pick a 259MB file of the TPCH lineitem table which contains 7200030
records. I use a modified orc-scan tool that calls the RowReader::seekToRow function once before each call the RowReader:: next() function to test this patch. The results are shown below:
|| original | optimized | speedup |
|:-----|:----:|:----:|:----:|
|Elapsed Time(s)|43.69|27.13|1.61|
### How was this patch tested?
The original UTs(TestPredicatePushdown, DictionaryEncoding::multipleStripesWithIndex, DictionaryEncoding::multipleStripesWithoutIndex) will cover this patch.
Signed-off-by: Dongjoon Hyun <[email protected]>1 parent c106c80 commit 11a2544
3 files changed
Lines changed: 40 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
| 285 | + | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
| |||
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
394 | | - | |
395 | | - | |
396 | 395 | | |
397 | | - | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
398 | 420 | | |
399 | 421 | | |
400 | | - | |
401 | 422 | | |
402 | 423 | | |
403 | | - | |
404 | | - | |
405 | | - | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
| 424 | + | |
| 425 | + | |
414 | 426 | | |
| 427 | + | |
| 428 | + | |
415 | 429 | | |
416 | 430 | | |
417 | 431 | | |
| |||
1075 | 1089 | | |
1076 | 1090 | | |
1077 | 1091 | | |
| 1092 | + | |
1078 | 1093 | | |
1079 | 1094 | | |
1080 | 1095 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
| |||
0 commit comments