-
Notifications
You must be signed in to change notification settings - Fork 265
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
fix: fix the incorrect assertion for fixed size binary decoder #3050
fix: fix the incorrect assertion for fixed size binary decoder #3050
Conversation
ACTION NEEDED 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. |
cfa354b
to
dffa4d8
Compare
@@ -84,7 +84,7 @@ impl PrimitivePageDecoder for FixedSizeBinaryDecoder { | |||
let num_bytes = num_rows * self.byte_width; | |||
let bytes = self.bytes_decoder.decode(rows_to_skip, num_bytes)?; | |||
let bytes = bytes.as_fixed_width().unwrap(); | |||
debug_assert_eq!(bytes.bits_per_value, 8); | |||
debug_assert_eq!(bytes.bits_per_value, self.byte_width * 8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This decoder will be used if Lance format 2.1 is enabled and this assertion will fail for some input data.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3050 +/- ##
==========================================
+ Coverage 78.40% 78.42% +0.02%
==========================================
Files 240 240
Lines 78593 78637 +44
Branches 78593 78637 +44
==========================================
+ Hits 61617 61669 +52
+ Misses 13851 13825 -26
- Partials 3125 3143 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…test to verify the fixed size binary decoder really works.
dffa4d8
to
0bc992d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This PR tries to fix #3049
It fixes the incorrect assertion for fixed size binary decoder and add a test to verify fixed size binary decoder works.