Skip to content

refactor!: move all previous code into previous mod#5217

Merged
Xuanwo merged 9 commits intomainfrom
previous-refactor
Nov 12, 2025
Merged

refactor!: move all previous code into previous mod#5217
Xuanwo merged 9 commits intomainfrom
previous-refactor

Conversation

@Xuanwo
Copy link
Copy Markdown
Collaborator

@Xuanwo Xuanwo commented Nov 12, 2025

This PR will move all previous code into previous mod to make our code more clean for both human and AI.

This PR will also add clear alias of previous code like PreviousReader.


This PR was primarily authored with Codex using GPT-5-Codex and then hand-reviewed by me. I AM responsible for every change made in this PR. I aimed to keep it aligned with our goals, though I may have missed minor issues. Please flag anything that feels off, I'll fix it quickly.

Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Signed-off-by: Xuanwo <github@xuanwo.io>
Copy link
Copy Markdown
Member

@westonpace westonpace 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 tackling this cleanup. I like the change as it is more obvious when people are using something old. It would be nice if we could drop the old reader/writer someday but I don't know if we can yet.

use lance_core::datatypes::Schema;
use lance_encoding::decoder::{DecoderPlugins, FilterExpression};
use lance_file::v2::reader::{FileReader, FileReaderOptions, ReaderProjection};
use lance_file::reader::{FileReader, FileReaderOptions, ReaderProjection};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is a breaking rust-level change. There are potentially a few (maybe not very many) Rust users who use FileReader directly. I think we can still proceed with the change (we haven't ever claimed the Rust API is stable) but we should maybe mark the PR as breaking.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.92240% with 186 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.01%. Comparing base (4d2bcb9) to head (05530bf).

Files with missing lines Patch % Lines
rust/lance-file/src/previous/writer/mod.rs 92.29% 39 Missing and 31 partials ⚠️
rust/lance-file/src/previous/reader.rs 93.79% 38 Missing and 27 partials ⚠️
rust/lance/src/index/vector/ivf.rs 0.00% 20 Missing ⚠️
rust/lance/src/index/vector/ivf/io.rs 0.00% 11 Missing ⚠️
rust/lance/src/dataset/fragment.rs 77.77% 3 Missing and 1 partial ⚠️
rust/lance-index/src/vector/ivf/shuffler.rs 66.66% 0 Missing and 3 partials ⚠️
rust/lance-index/src/vector/pq/storage.rs 0.00% 3 Missing ⚠️
rust/lance/src/index/vector/ivf/builder.rs 0.00% 3 Missing ⚠️
rust/lance-index/src/vector/hnsw/index.rs 0.00% 2 Missing ⚠️
rust/lance-index/src/vector/sq/storage.rs 0.00% 2 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5217      +/-   ##
==========================================
- Coverage   82.02%   82.01%   -0.02%     
==========================================
  Files         342      342              
  Lines      141495   141516      +21     
  Branches   141495   141516      +21     
==========================================
- Hits       116059   116058       -1     
- Misses      21595    21618      +23     
+ Partials     3841     3840       -1     
Flag Coverage Δ
unittests 82.01% <90.92%> (-0.02%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Xuanwo Xuanwo merged commit 6a641f0 into main Nov 12, 2025
30 of 31 checks passed
@Xuanwo Xuanwo deleted the previous-refactor branch November 12, 2025 18:46
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
)

This PR will move all previous code into `previous` mod to make our code
more clean for both human and AI.

This PR will also add clear alias of previous code like
`PreviousReader`.

---

**This PR was primarily authored with Codex using GPT-5-Codex and then
hand-reviewed by me. I AM responsible for every change made in this PR.
I aimed to keep it aligned with our goals, though I may have missed
minor issues. Please flag anything that feels off, I'll fix it
quickly.**

---------

Signed-off-by: Xuanwo <github@xuanwo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants