Skip to content

fix: panic unwrap on None in decoder.rs#5424

Merged
wjones127 merged 7 commits intolance-format:mainfrom
camilesing:fix_unwrap_on_none_in_decoder
Dec 12, 2025
Merged

fix: panic unwrap on None in decoder.rs#5424
wjones127 merged 7 commits intolance-format:mainfrom
camilesing:fix_unwrap_on_none_in_decoder

Conversation

@camilesing
Copy link
Copy Markdown
Contributor

for: #5119

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions github-actions Bot added the bug Something isn't working label Dec 6, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 7, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance-encoding/src/decoder.rs 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Comment thread rust/lance-encoding/src/decoder.rs Outdated
Comment thread rust/lance-encoding/src/decoder.rs Outdated
@camilesing camilesing force-pushed the fix_unwrap_on_none_in_decoder branch from b639cd3 to 0ca3ab5 Compare December 10, 2025 02:44
@camilesing
Copy link
Copy Markdown
Contributor Author

@wjones127 seems CI failed because of the other PR

@wjones127
Copy link
Copy Markdown
Contributor

This is the error:

error[E0499]: cannot borrow `*column_infos` as mutable more than once at a time
   --> rust/lance-encoding/src/decoder.rs:829:25
    |
792 |             let column_info = column_infos.expect_next()?;
    |                               ------------ first mutable borrow occurs here
...
829 |                         column_infos,
    |                         ^^^^^^^^^^^^ second mutable borrow occurs here
830 |                         buffers,
831 |                         &column_info,
    |                         ------------ first borrow later used here

I think you may need to call .clone().

@wjones127
Copy link
Copy Markdown
Contributor

I've added the .clone() call for you and removed the unrelated changes.

@camilesing
Copy link
Copy Markdown
Contributor Author

@wjones127 Thx you, I will pay more attention later

@wjones127 wjones127 merged commit 6019650 into lance-format:main Dec 12, 2025
28 checks passed
@camilesing camilesing deleted the fix_unwrap_on_none_in_decoder branch December 13, 2025 06:20
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Dec 16, 2025
for: lance-format#5119

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Dec 16, 2025
for: lance-format#5119

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
jackye1995 pushed a commit to jackye1995/lance that referenced this pull request Jan 21, 2026
for: lance-format#5119

---------

Co-authored-by: Will Jones <willjones127@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants