Commit 79575aa
authored
perf: zero-copy path in
# Which issue does this PR close?
- Closes #8685.
# What changes are included in this PR?
In the implementation of `RowConverter::from_binary`, the `BinaryArray`
is broken into parts and an attempt is made to convert the data buffer
into `Vec` at no copying cost with `Buffer::into_vec`. Only if this
fails, the data is copied out for a newly allocated `Vec`.
# Are these changes tested?
Passes existing tests using `RowConverter::from_binary`, which all
convert a non-shared buffer taking advantage of the optimization.
Another test is added to cover the copying path.
# Are there any user-facing changes?
NoRowConverter::from_binary (#8686)1 parent 021090f commit 79575aa
1 file changed
+19
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
916 | 920 | | |
917 | | - | |
918 | | - | |
| 921 | + | |
| 922 | + | |
919 | 923 | | |
920 | 924 | | |
921 | 925 | | |
| |||
2474 | 2478 | | |
2475 | 2479 | | |
2476 | 2480 | | |
| 2481 | + | |
| 2482 | + | |
| 2483 | + | |
| 2484 | + | |
| 2485 | + | |
| 2486 | + | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
| 2491 | + | |
| 2492 | + | |
| 2493 | + | |
2477 | 2494 | | |
2478 | 2495 | | |
2479 | 2496 | | |
| |||
0 commit comments