Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: new buffer abstractions in decoders #2648

Merged
merged 5 commits into from
Jul 27, 2024

Conversation

westonpace
Copy link
Contributor

Introduce LanceBuffer, copy-on-write version designed for interoperability

between arrow_buffer::Buffer, bytes::Bytes, and Vec (and their mutable counterparts). Use this to remove some copies on the decode path (the value decoder is now truly zero-copy).

Introduce the DataBlock and a concept of "data layouts". Use this to simplify decoding pathways.

…ility

between arrow_buffer::Buffer, bytes::Bytes, and Vec<u8> (and their mutable
counterparts).  Use this to remove some copies on the decode path (the
value decoder is now truly zero-copy).

Introduce the DataBlock and a concept of "data layouts".  Use this to
simplify decoding pathways.
@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 96 lines in your changes missing coverage. Please review.

Project coverage is 79.38%. Comparing base (a23ba62) to head (7be3f04).

Files Patch % Lines
rust/lance-encoding/src/data.rs 59.43% 34 Missing and 9 partials ⚠️
rust/lance-encoding/src/encodings/physical/fsst.rs 0.00% 27 Missing ⚠️
rust/lance-encoding/src/buffer.rs 62.85% 13 Missing ⚠️
...ust/lance-encoding/src/encodings/physical/basic.rs 76.92% 0 Missing and 3 partials ⚠️
...ance-encoding/src/encodings/physical/dictionary.rs 86.36% 1 Missing and 2 partials ⚠️
.../lance-encoding/src/encodings/logical/primitive.rs 86.66% 0 Missing and 2 partials ⚠️
...st/lance-encoding/src/encodings/physical/binary.rs 90.00% 0 Missing and 2 partials ⚠️
...encoding/src/encodings/physical/fixed_size_list.rs 71.42% 0 Missing and 2 partials ⚠️
rust/lance-encoding/src/decoder.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2648      +/-   ##
==========================================
- Coverage   79.38%   79.38%   -0.01%     
==========================================
  Files         221      222       +1     
  Lines       64718    64544     -174     
  Branches    64718    64544     -174     
==========================================
- Hits        51376    51237     -139     
+ Misses      10377    10343      -34     
+ Partials     2965     2964       -1     
Flag Coverage Δ
unittests 79.38% <70.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very nice.. I think the DataBlock seems like a very sensible abstraction 👍

Comment on lines 166 to 167
/// The number of bits per offset
pub bits_per_offset: u32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this could probably be a u8 or something.

@westonpace westonpace merged commit fc7d78c into lancedb:main Jul 27, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants