Skip to content

Commit b20d9e8

Browse files
committed
add second field to test
Signed-off-by: Andrew Duffy <[email protected]>
1 parent 50f2a1c commit b20d9e8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

vortex-file/tests/test_write_table.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,17 @@ async fn test_file_roundtrip() {
6565
)
6666
.into_array();
6767

68-
// Create a writer which by default uses the BtrBlocks compressor, but for a.raw column it will
69-
// leave it uncompressed. And for the a.no_dict column disables dictionary compression.
68+
// Create a writer which by default uses the BtrBlocks compressor for a.compressed, but leaves
69+
// the b and the a.raw columns uncompressed.
7070
let default_strategy = Arc::new(CompressingStrategy::new_btrblocks(
7171
FlatLayoutStrategy::default(),
7272
false,
7373
));
7474

7575
let writer = Arc::new(
7676
TableStrategy::new(Arc::new(FlatLayoutStrategy::default()), default_strategy)
77-
.with_field_writer(field_path!(a.raw), Arc::new(FlatLayoutStrategy::default())),
77+
.with_field_writer(field_path!(a.raw), Arc::new(FlatLayoutStrategy::default()))
78+
.with_field_writer(field_path!(b), Arc::new(FlatLayoutStrategy::default())),
7879
);
7980

8081
let mut bytes = Vec::new();
@@ -101,13 +102,15 @@ async fn test_file_roundtrip() {
101102
let next = next.expect("next");
102103
let next = next.to_struct();
103104
let a = next.field_by_name("a").unwrap().to_struct();
105+
let b = next.field_by_name("b").unwrap();
104106

105107
let raw = a.field_by_name("raw").unwrap();
106108
let compressed = a.field_by_name("compressed").unwrap();
107109

108110
assert!(raw.is_canonical());
109111
assert!(!compressed.is_canonical());
110112

113+
assert!(b.is_canonical());
111114
assert!(raw.nbytes() > compressed.nbytes());
112115
}
113116
}

0 commit comments

Comments
 (0)