Skip to content

Commit 6b49b97

Browse files
committed
apply suggestion
Signed-off-by: Huaijin <[email protected]>
1 parent 9f4cacd commit 6b49b97

File tree

1 file changed

+11
-37
lines changed

1 file changed

+11
-37
lines changed

vortex-datafusion/src/persistent/opener.rs

Lines changed: 11 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -536,37 +536,11 @@ mod tests {
536536

537537
fn make_test_batch_with_10_rows() -> RecordBatch {
538538
record_batch!(
539-
(
540-
"a",
541-
Int32,
542-
vec![
543-
Some(0),
544-
Some(1),
545-
Some(2),
546-
Some(3),
547-
Some(4),
548-
Some(5),
549-
Some(6),
550-
Some(7),
551-
Some(8),
552-
Some(9)
553-
]
554-
),
539+
("a", Int32, (0..=9).map(Some).collect::<Vec<_>>()),
555540
(
556541
"b",
557542
Utf8,
558-
vec![
559-
Some("row0"),
560-
Some("row1"),
561-
Some("row2"),
562-
Some("row3"),
563-
Some("row4"),
564-
Some("row5"),
565-
Some("row6"),
566-
Some("row7"),
567-
Some("row8"),
568-
Some("row9")
569-
]
543+
(0..=9).map(|i| Some(format!("r{}", i))).collect::<Vec<_>>()
570544
)
571545
)
572546
.unwrap()
@@ -1015,10 +989,10 @@ mod tests {
1015989
| a | b |
1016990
| Int32 | Utf8 |
1017991
+-------+------+
1018-
| 1 | row1 |
1019-
| 3 | row3 |
1020-
| 5 | row5 |
1021-
| 7 | row7 |
992+
| 1 | r1 |
993+
| 3 | r3 |
994+
| 5 | r5 |
995+
| 7 | r7 |
1022996
+-------+------+
1023997
");
1024998

@@ -1071,11 +1045,11 @@ mod tests {
10711045
| a | b |
10721046
| Int32 | Utf8 |
10731047
+-------+------+
1074-
| 1 | row1 |
1075-
| 3 | row3 |
1076-
| 5 | row5 |
1077-
| 7 | row7 |
1078-
| 9 | row9 |
1048+
| 1 | r1 |
1049+
| 3 | r3 |
1050+
| 5 | r5 |
1051+
| 7 | r7 |
1052+
| 9 | r9 |
10791053
+-------+------+
10801054
");
10811055

0 commit comments

Comments
 (0)