-
Notifications
You must be signed in to change notification settings - Fork 728
fix: inconsistency inline constant handling for non‑fixed‑stride datatype #5851
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
Closed
zhangyue19921010
wants to merge
8
commits into
lance-format:main
from
zhangyue19921010:fix-inconsistency
Closed
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c59a4ef
fix: inconsistency inline constant handling for non‑fixed‑stride data…
zhangyue19921010 3978863
fix: inconsistency inline constant handling for non‑fixed‑stride data…
zhangyue19921010 e49860d
fix code style
zhangyue19921010 126c0d2
code review
28229f1
Merge branch 'main' into fix-inconsistency
6e6a65a
code review
zhangyue19921010 d1b27d4
code review
zhangyue19921010 13165dc
code review
zhangyue19921010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6313,6 +6313,33 @@ mod tests { | |
| check_round_trip_encoding_of_data(vec![arr], &test_cases, HashMap::new()).await; | ||
| } | ||
|
|
||
| #[tokio::test] | ||
| async fn test_constant_layout_out_of_line_boolean_v2_2() { | ||
| use crate::format::pb21::page_layout::Layout; | ||
|
|
||
| let arr: ArrayRef = Arc::new(arrow_array::BooleanArray::from_iter(std::iter::repeat_n( | ||
| Some(true), | ||
| 512, | ||
| ))); | ||
| let field = arrow_schema::Field::new("c", DataType::Boolean, true); | ||
| let page = encode_first_page(field, arr.clone(), LanceFileVersion::V2_2).await; | ||
|
|
||
| let PageEncoding::Structural(layout) = &page.description else { | ||
| panic!("Expected structural encoding"); | ||
| }; | ||
| let Layout::ConstantLayout(layout) = layout.layout.as_ref().unwrap() else { | ||
| panic!("Expected constant layout in slot 2"); | ||
| }; | ||
| assert!(layout.inline_value.is_none()); | ||
| assert_eq!(page.data.len(), 1); | ||
|
|
||
| let test_cases = TestCases::default() | ||
| .with_min_file_version(LanceFileVersion::V2_2) | ||
| .with_max_file_version(LanceFileVersion::V2_2) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove the |
||
| .with_page_sizes(vec![4096]); | ||
| check_round_trip_encoding_of_data(vec![arr], &test_cases, HashMap::new()).await; | ||
| } | ||
|
|
||
| #[tokio::test] | ||
| async fn test_constant_layout_nullable_item_v2_2() { | ||
| use crate::format::pb21::page_layout::Layout; | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.