-
Notifications
You must be signed in to change notification settings - Fork 196
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: bugs in list codec when dealing with a list of empty lists or multiple lists in a single page #2222
Conversation
with mutliple lists being written to a single page. Rework testing infrastructure to make it easy to write new tests with specific cases.
258ae86
to
ef927b0
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2222 +/- ##
==========================================
+ Coverage 81.15% 81.17% +0.01%
==========================================
Files 185 185
Lines 53508 53641 +133
Branches 53508 53641 +133
==========================================
+ Hits 43425 43543 +118
- Misses 7609 7620 +11
- Partials 2474 2478 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Got question about one particular case. otherwise, looks good.
// The first offset doesn't have to be 0 (this happens when lists are sliced) | ||
// | ||
// So if the previous offsets are [0, 3, 5] and the current offsets are | ||
// [10, 11, 12] then we want to add 5 - 10 to all of the current offsets | ||
// (skipping the first) to get [6, 7] and then append them to the previous | ||
// offsets to get [0, 3, 5, 6, 7] |
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.
Are we handling the case where the first set of offsets doesn't start at 0?
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.
Yes, and the slicing tests in random will test this.
let list_array = list_builder.finish(); | ||
|
||
let test_cases = TestCases::default().with_range(0..2).with_indices(vec![1]); | ||
check_round_trip_encoding_of_data(vec![Arc::new(list_array)], &test_cases).await; |
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.
Maybe we should check various slicing patterns here? That is, something like:
check_round_trip_encoding_of_data(vec![Arc::new(list_array)], &test_cases).await; | |
check_round_trip_encoding_of_data(vec![Arc::new(list_array)], &test_cases).await; | |
check_round_trip_encoding_of_data(vec![Arc::new(list_array).slice(3, 0)], &test_cases).await; | |
check_round_trip_encoding_of_data(vec![Arc::new(list_array).slice(2, 0), Arc::new(list_array).slice(1, 3)], &test_cases).await; |
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.
It sounds like this might be covered in check_round_trip_field_encoding_random
. If so, ignore this.
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.
Yep :)
No description provided.