@@ -29,7 +29,7 @@ use arrow::datatypes::{
2929use arrow_array:: {
3030 make_array, Array , ArrayRef , BinaryArray , BooleanArray , Date32Array , Date64Array ,
3131 Decimal128Array , FixedSizeBinaryArray , Float32Array , Float64Array , Int16Array ,
32- Int32Array , Int64Array , Int8Array , RecordBatch , StringArray ,
32+ Int32Array , Int64Array , Int8Array , LargeStringArray , RecordBatch , StringArray ,
3333 TimestampMicrosecondArray , TimestampMillisecondArray , TimestampNanosecondArray ,
3434 TimestampSecondArray , UInt16Array , UInt32Array , UInt64Array , UInt8Array ,
3535} ;
@@ -1447,6 +1447,38 @@ async fn test_struct() {
14471447 }
14481448 . run ( ) ;
14491449}
1450+
1451+ // UTF8
1452+ #[ tokio:: test]
1453+ async fn test_utf8 ( ) {
1454+ let reader = TestReader {
1455+ scenario : Scenario :: UTF8 ,
1456+ row_per_group : 5 ,
1457+ } ;
1458+
1459+ // test for utf8
1460+ Test {
1461+ reader : reader. build ( ) . await ,
1462+ expected_min : Arc :: new ( StringArray :: from ( vec ! [ "a" , "e" ] ) ) ,
1463+ expected_max : Arc :: new ( StringArray :: from ( vec ! [ "d" , "i" ] ) ) ,
1464+ expected_null_counts : UInt64Array :: from ( vec ! [ 1 , 0 ] ) ,
1465+ expected_row_counts : UInt64Array :: from ( vec ! [ 5 , 5 ] ) ,
1466+ column_name : "utf8" ,
1467+ }
1468+ . run ( ) ;
1469+
1470+ // test for large_utf8
1471+ Test {
1472+ reader : reader. build ( ) . await ,
1473+ expected_min : Arc :: new ( LargeStringArray :: from ( vec ! [ "a" , "e" ] ) ) ,
1474+ expected_max : Arc :: new ( LargeStringArray :: from ( vec ! [ "d" , "i" ] ) ) ,
1475+ expected_null_counts : UInt64Array :: from ( vec ! [ 1 , 0 ] ) ,
1476+ expected_row_counts : UInt64Array :: from ( vec ! [ 5 , 5 ] ) ,
1477+ column_name : "large_utf8" ,
1478+ }
1479+ . run ( ) ;
1480+ }
1481+
14501482////// Files with missing statistics ///////
14511483
14521484#[ tokio:: test]
0 commit comments