chore: add utilities to LanceBuffer#2784
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2784 +/- ##
==========================================
- Coverage 79.30% 79.29% -0.02%
==========================================
Files 227 227
Lines 68268 68426 +158
Branches 68268 68426 +158
==========================================
+ Hits 54141 54257 +116
- Misses 11006 11037 +31
- Partials 3121 3132 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
rust/lance-encoding/src/buffer.rs
Outdated
| } | ||
| } | ||
|
|
||
| // Mostly useful for unit testing. It is zero-copy |
There was a problem hiding this comment.
huh, Vec::from array copies the stack located array data into heap?
There was a problem hiding this comment.
Ah, you are right. I read that "it moves the values into the Vec" and thought that meant zero-copy but it just means the items inside the Vec are moved and not cloned.
There was a problem hiding this comment.
I changed the impl into a copy_array method and updated the comment. I'd like to keep all From implementations zero-copy (again, trying to make it obvious when a copy of data happens)
|
LGTM! |
This is the first in a series of PRs that eventually reworks the v2 encoders to use
DataBlock. This PR doesn't add any public facing capability on its own but merely adds a few useful utilities toLanceBuffer.