Skip to content
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

feat: enable write variable width data in 2.1 #3090

Merged
merged 12 commits into from
Nov 5, 2024
Prev Previous commit
Next Next commit
Merge branch 'main' into variable_width_2.1
broccoliSpicy authored Nov 5, 2024

Verified

This commit was signed with the committer’s verified signature.
wjones127 Will Jones
commit 792448cc152a09b17bd46b475daae602a17947a1
5 changes: 5 additions & 0 deletions rust/lance-encoding/src/statistics.rs
Original file line number Diff line number Diff line change
@@ -1194,9 +1194,10 @@
}

#[test]
fn test_max_length_variable_width_datablock() {

Check warning on line 1197 in rust/lance-encoding/src/statistics.rs

GitHub Actions / linux-arm

Diff in /home/runner/work/lance/lance/rust/lance-encoding/src/statistics.rs

Check warning on line 1197 in rust/lance-encoding/src/statistics.rs

GitHub Actions / linux-build (stable)

Diff in /home/runner/work/lance/lance/rust/lance-encoding/src/statistics.rs

Check warning on line 1197 in rust/lance-encoding/src/statistics.rs

GitHub Actions / linux-build (nightly)

Diff in /home/runner/work/lance/lance/rust/lance-encoding/src/statistics.rs
let string_array = StringArray::from(vec![Some("hello"), Some("world")]);
let block = DataBlock::from_array(string_array.clone());

let expected_max_length =
Arc::new(UInt64Array::from(vec![string_array.value_length(0) as u64])) as ArrayRef;
let actual_max_length = block.get_stat(Stat::MaxLength);
@@ -1209,6 +1210,7 @@
Some("to be returned as values of procedures"),
]);
let block = DataBlock::from_array(string_array.clone());

let expected_max_length =
Arc::new(UInt64Array::from(vec![string_array.value_length(1) as u64])) as ArrayRef;
let actual_max_length = block.get_stat(Stat::MaxLength);
@@ -1221,6 +1223,7 @@
Some("Samuel Eilenberg"),
]);
let block = DataBlock::from_array(string_array.clone());

let expected_max_length =
Arc::new(UInt64Array::from(vec![string_array.value_length(1) as u64])) as ArrayRef;
let actual_max_length = block.get_stat(Stat::MaxLength);
@@ -1229,6 +1232,7 @@

let string_array = LargeStringArray::from(vec![Some("hello"), Some("world")]);
let block = DataBlock::from_array(string_array.clone());

let expected_max_length =
Arc::new(UInt64Array::from(vec![string_array.value(0).len() as u64])) as ArrayRef;
let actual_max_length = block.get_stat(Stat::MaxLength);
@@ -1241,6 +1245,7 @@
Some("to be returned as values of procedures"),
]);
let block = DataBlock::from_array(string_array.clone());

let expected_max_length =
Arc::new(UInt64Array::from(vec![string_array.value_length(1) as u64])) as ArrayRef;
let actual_max_length = block.get_stat(Stat::MaxLength);
You are viewing a condensed version of this merge commit. You can view the full changes here.