Skip to content

Conversation

@Xuanwo
Copy link
Collaborator

@Xuanwo Xuanwo commented Jan 30, 2026

Fix a panic in mini-block dictionary decode when the dictionary buffer uses bitpacking encodings.


Parts of this PR were drafted with assistance from Codex (with gpt-5.2) and fully reviewed and edited by me. I take full responsibility for all changes.

Handle bitpacking dictionary encodings in MiniBlockScheduler and add regression tests.
@github-actions
Copy link
Contributor

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@Xuanwo Xuanwo changed the title Fix mini-block dictionary bitpacking panic fix: fix mini-block dictionary bitpacking panic Jan 30, 2026
@github-actions
Copy link
Contributor

Code Review

Overall Assessment: This is a well-structured bug fix that addresses a real panic when using mini-block dictionary encoding with bitpacking compression.

Positive Aspects

  • The fix correctly handles InlineBitpacking and OutOfLineBitpacking dictionary encodings
  • Good refactoring that reduces code duplication in MiniBlockScheduler::try_new
  • The change from unreachable!() to Error::InvalidInput for unrecognized encodings improves robustness
  • Both unit test and end-to-end integration test are included

P1: Minor Issues

  1. Test assertion could be more precise (dataset_scanner.rs:467): The assertion checks that the encoding string contains both "OutOfLineBitpacking" and "dictionary", but the format of describe_encoding() output could change. Consider using a more structured way to verify the encoding if available.

Suggestions (non-blocking)

  • The end-to-end test is thorough but could benefit from verifying the actual data values after scanning (currently only checks column count).

Automated review by Claude

@github-actions github-actions bot added the bug Something isn't working label Jan 30, 2026
@Xuanwo Xuanwo merged commit bdbf80a into main Jan 30, 2026
32 of 33 checks passed
@Xuanwo Xuanwo deleted the fix/miniblock-dict-bitpacking-panic branch January 30, 2026 09:25
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 83.67347% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../lance-encoding/src/encodings/logical/primitive.rs 83.67% 7 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

vivek-bharathan pushed a commit to vivek-bharathan/lance that referenced this pull request Feb 2, 2026
Fix a panic in mini-block dictionary decode when the dictionary buffer
uses bitpacking encodings.

---

**Parts of this PR were drafted with assistance from Codex (with
`gpt-5.2`) and fully reviewed and edited by me. I take full
responsibility for all changes.**
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.

3 participants