@@ -422,7 +422,7 @@ impl Display for DFSchema {
422
422
fn fmt ( & self , f : & mut Formatter ) -> std:: fmt:: Result {
423
423
write ! (
424
424
f,
425
- "fields:{} , metadata:{:?}" ,
425
+ "fields:[{}] , metadata:{:?}" ,
426
426
self . fields
427
427
. iter( )
428
428
. map( |field| field. qualified_name( ) )
@@ -587,14 +587,14 @@ mod tests {
587
587
#[ test]
588
588
fn from_unqualified_schema ( ) -> Result < ( ) > {
589
589
let schema = DFSchema :: try_from ( test_schema_1 ( ) ) ?;
590
- assert_eq ! ( "c0, c1" , schema. to_string( ) ) ;
590
+ assert_eq ! ( "fields:[ c0, c1], metadata:{} " , schema. to_string( ) ) ;
591
591
Ok ( ( ) )
592
592
}
593
593
594
594
#[ test]
595
595
fn from_qualified_schema ( ) -> Result < ( ) > {
596
596
let schema = DFSchema :: try_from_qualified_schema ( "t1" , & test_schema_1 ( ) ) ?;
597
- assert_eq ! ( "t1.c0, t1.c1" , schema. to_string( ) ) ;
597
+ assert_eq ! ( "fields:[ t1.c0, t1.c1], metadata:{} " , schema. to_string( ) ) ;
598
598
Ok ( ( ) )
599
599
}
600
600
@@ -613,7 +613,10 @@ mod tests {
613
613
let left = DFSchema :: try_from_qualified_schema ( "t1" , & test_schema_1 ( ) ) ?;
614
614
let right = DFSchema :: try_from_qualified_schema ( "t2" , & test_schema_1 ( ) ) ?;
615
615
let join = left. join ( & right) ?;
616
- assert_eq ! ( "t1.c0, t1.c1, t2.c0, t2.c1" , join. to_string( ) ) ;
616
+ assert_eq ! (
617
+ "fields:[t1.c0, t1.c1, t2.c0, t2.c1], metadata:{}" ,
618
+ join. to_string( )
619
+ ) ;
617
620
// test valid access
618
621
assert ! ( join. field_with_qualified_name( "t1" , "c0" ) . is_ok( ) ) ;
619
622
assert ! ( join. field_with_qualified_name( "t2" , "c0" ) . is_ok( ) ) ;
@@ -657,7 +660,10 @@ mod tests {
657
660
let left = DFSchema :: try_from_qualified_schema ( "t1" , & test_schema_1 ( ) ) ?;
658
661
let right = DFSchema :: try_from ( test_schema_2 ( ) ) ?;
659
662
let join = left. join ( & right) ?;
660
- assert_eq ! ( "t1.c0, t1.c1, c100, c101" , join. to_string( ) ) ;
663
+ assert_eq ! (
664
+ "fields:[t1.c0, t1.c1, c100, c101], metadata:{}" ,
665
+ join. to_string( )
666
+ ) ;
661
667
// test valid access
662
668
assert ! ( join. field_with_qualified_name( "t1" , "c0" ) . is_ok( ) ) ;
663
669
assert ! ( join. field_with_unqualified_name( "c0" ) . is_ok( ) ) ;
0 commit comments