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

feat: add backwards compatibility with 0.13.0 v2 datasets #2755

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

westonpace
Copy link
Contributor

@westonpace westonpace commented Aug 19, 2024

A breaking change was made to the binary encoding in 0.14.0. v2 was still labeled as experimental at the time. However, a significant number of people have run into this issue and it can be difficult to migrate since it requires recreating the data. This PR adds support for reading the old style.

Note: this will only help reading lance datasets and not lance files. This is because the lance file reader uses the default projection (tries to infer which columns to read from the schema) and a lance dataset uses the field id -> column index mapping in the manifest. The default projection logic has changed and so that approach no longer works.

@github-actions github-actions bot added enhancement New feature or request python labels Aug 19, 2024
@westonpace westonpace marked this pull request as draft August 19, 2024 15:32
@westonpace westonpace force-pushed the feat/0.13.0-backwards-compat-v2 branch from 02b172e to 9cabb9f Compare August 19, 2024 15:41
@westonpace westonpace force-pushed the feat/0.13.0-backwards-compat-v2 branch from 9cabb9f to 20aa10d Compare October 1, 2024 23:36
@westonpace westonpace marked this pull request as ready for review October 1, 2024 23:36
@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 34.84163% with 144 lines in your changes missing coverage. Please review.

Project coverage is 78.80%. Comparing base (9e5e96c) to head (0b87848).

Files with missing lines Patch % Lines
...ust/lance-encoding/src/encodings/logical/binary.rs 0.00% 106 Missing ⚠️
rust/lance-encoding/src/decoder.rs 66.95% 34 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2755      +/-   ##
==========================================
- Coverage   78.94%   78.80%   -0.15%     
==========================================
  Files         234      235       +1     
  Lines       72978    73141     +163     
  Branches    72978    73141     +163     
==========================================
+ Hits        57614    57639      +25     
- Misses      12382    12521     +139     
+ Partials     2982     2981       -1     
Flag Coverage Δ
unittests 78.80% <34.84%> (-0.15%) ⬇️

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.

Thanks for doing this. Hopefully this will save us some headaches.

@westonpace westonpace force-pushed the feat/0.13.0-backwards-compat-v2 branch from 379af55 to a69741b Compare October 2, 2024 23:55
@westonpace westonpace merged commit 0ab1d5c into lancedb:main Oct 3, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants