File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -698,7 +698,7 @@ impl DFSchema {
698698 // check nested fields
699699 match ( dt1, dt2) {
700700 ( DataType :: Dictionary ( _, v1) , DataType :: Dictionary ( _, v2) ) => {
701- v1. as_ref ( ) == v2. as_ref ( )
701+ Self :: datatype_is_logically_equal ( v1. as_ref ( ) , v2. as_ref ( ) )
702702 }
703703 ( DataType :: Dictionary ( _, v1) , othertype)
704704 | ( othertype, DataType :: Dictionary ( _, v1) ) => {
@@ -1806,6 +1806,21 @@ mod tests {
18061806 & DataType :: Utf8View ,
18071807 & DataType :: Dictionary ( Box :: new( DataType :: Int32 ) , Box :: new( DataType :: Utf8 ) )
18081808 ) ) ;
1809+
1810+ assert ! ( DFSchema :: datatype_is_logically_equal(
1811+ & DataType :: Dictionary (
1812+ Box :: new( DataType :: Int32 ) ,
1813+ Box :: new( DataType :: List (
1814+ Field :: new( "element" , DataType :: Utf8 , false ) . into( )
1815+ ) )
1816+ ) ,
1817+ & DataType :: Dictionary (
1818+ Box :: new( DataType :: Int32 ) ,
1819+ Box :: new( DataType :: List (
1820+ Field :: new( "element" , DataType :: Utf8View , false ) . into( )
1821+ ) )
1822+ )
1823+ ) ) ;
18091824 }
18101825
18111826 #[ test]
You can’t perform that action at this time.
0 commit comments