File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed 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) ) => {
@@ -1800,6 +1800,21 @@ mod tests {
18001800 & DataType :: Utf8View ,
18011801 & DataType :: Dictionary ( Box :: new( DataType :: Int32 ) , Box :: new( DataType :: Utf8 ) )
18021802 ) ) ;
1803+
1804+ assert ! ( DFSchema :: datatype_is_logically_equal(
1805+ & DataType :: Dictionary (
1806+ Box :: new( DataType :: Int32 ) ,
1807+ Box :: new( DataType :: List (
1808+ Field :: new( "element" , DataType :: Utf8 , false ) . into( )
1809+ ) )
1810+ ) ,
1811+ & DataType :: Dictionary (
1812+ Box :: new( DataType :: Int32 ) ,
1813+ Box :: new( DataType :: List (
1814+ Field :: new( "element" , DataType :: Utf8View , false ) . into( )
1815+ ) )
1816+ )
1817+ ) ) ;
18031818 }
18041819
18051820 #[ test]
You can’t perform that action at this time.
0 commit comments