klion26 commented on code in PR #7876: URL: https://github.com/apache/arrow-rs/pull/7876#discussion_r2189043032
########## parquet-variant/src/variant/list.rs: ########## @@ -410,4 +412,170 @@ mod tests { let elem1 = variant_list.get(1).unwrap(); assert_eq!(elem1.as_boolean(), Some(false)); } + + #[test] + fn test_large_variant_list_with_total_child_length_between_2_pow_8_and_2_pow_16() { + // all the tests below will set the total child size to ~500, + // which is larger than 2^8 but less than 2^16. + // total child size = list_size * single_child_item_len + + let mut list_size: usize = 1; + let mut single_child_item_len: usize = 500; Review Comment: Before I want to update the `list_size` to verify the `is_large` in metadata, now the `is_large` is removed, I can simplify this test to a single case(single `list_size` and `single_child_item_len`) if needed. ########## parquet-variant/src/variant/list.rs: ########## @@ -410,4 +412,170 @@ mod tests { let elem1 = variant_list.get(1).unwrap(); assert_eq!(elem1.as_boolean(), Some(false)); } + + #[test] + fn test_large_variant_list_with_total_child_length_between_2_pow_8_and_2_pow_16() { + // all the tests below will set the total child size to ~500, + // which is larger than 2^8 but less than 2^16. + // total child size = list_size * single_child_item_len + + let mut list_size: usize = 1; + let mut single_child_item_len: usize = 500; Review Comment: Before I want to update the `list_size` to verify the `is_large` in metadata, now the `is_large` has been removed, I can simplify this test to a single case(single `list_size` and `single_child_item_len`) if needed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org